Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.tensorflow.framework.TensorProto Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensor.proto
package org.tensorflow.framework;
/**
*
* Protocol buffer representing a tensor.
*
*
* Protobuf type {@code tensorflow.TensorProto}
*/
public final class TensorProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.TensorProto)
TensorProtoOrBuilder {
// Use TensorProto.newBuilder() to construct.
private TensorProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TensorProto() {
dtype_ = 0;
versionNumber_ = 0;
tensorContent_ = com.google.protobuf.ByteString.EMPTY;
halfVal_ = java.util.Collections.emptyList();
floatVal_ = java.util.Collections.emptyList();
doubleVal_ = java.util.Collections.emptyList();
intVal_ = java.util.Collections.emptyList();
stringVal_ = java.util.Collections.emptyList();
scomplexVal_ = java.util.Collections.emptyList();
int64Val_ = java.util.Collections.emptyList();
boolVal_ = java.util.Collections.emptyList();
dcomplexVal_ = java.util.Collections.emptyList();
resourceHandleVal_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private TensorProto(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
dtype_ = rawValue;
break;
}
case 18: {
org.tensorflow.framework.TensorShapeProto.Builder subBuilder = null;
if (tensorShape_ != null) {
subBuilder = tensorShape_.toBuilder();
}
tensorShape_ = input.readMessage(org.tensorflow.framework.TensorShapeProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(tensorShape_);
tensorShape_ = subBuilder.buildPartial();
}
break;
}
case 24: {
versionNumber_ = input.readInt32();
break;
}
case 34: {
tensorContent_ = input.readBytes();
break;
}
case 45: {
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
floatVal_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
floatVal_.add(input.readFloat());
break;
}
case 42: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) {
floatVal_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
while (input.getBytesUntilLimit() > 0) {
floatVal_.add(input.readFloat());
}
input.popLimit(limit);
break;
}
case 49: {
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
doubleVal_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000040;
}
doubleVal_.add(input.readDouble());
break;
}
case 50: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040) && input.getBytesUntilLimit() > 0) {
doubleVal_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000040;
}
while (input.getBytesUntilLimit() > 0) {
doubleVal_.add(input.readDouble());
}
input.popLimit(limit);
break;
}
case 56: {
if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
intVal_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000080;
}
intVal_.add(input.readInt32());
break;
}
case 58: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000080) == 0x00000080) && input.getBytesUntilLimit() > 0) {
intVal_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000080;
}
while (input.getBytesUntilLimit() > 0) {
intVal_.add(input.readInt32());
}
input.popLimit(limit);
break;
}
case 66: {
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
stringVal_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
stringVal_.add(input.readBytes());
break;
}
case 77: {
if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
scomplexVal_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000200;
}
scomplexVal_.add(input.readFloat());
break;
}
case 74: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000200) == 0x00000200) && input.getBytesUntilLimit() > 0) {
scomplexVal_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000200;
}
while (input.getBytesUntilLimit() > 0) {
scomplexVal_.add(input.readFloat());
}
input.popLimit(limit);
break;
}
case 80: {
if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
int64Val_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000400;
}
int64Val_.add(input.readInt64());
break;
}
case 82: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000400) == 0x00000400) && input.getBytesUntilLimit() > 0) {
int64Val_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000400;
}
while (input.getBytesUntilLimit() > 0) {
int64Val_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
case 88: {
if (!((mutable_bitField0_ & 0x00000800) == 0x00000800)) {
boolVal_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000800;
}
boolVal_.add(input.readBool());
break;
}
case 90: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000800) == 0x00000800) && input.getBytesUntilLimit() > 0) {
boolVal_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000800;
}
while (input.getBytesUntilLimit() > 0) {
boolVal_.add(input.readBool());
}
input.popLimit(limit);
break;
}
case 97: {
if (!((mutable_bitField0_ & 0x00001000) == 0x00001000)) {
dcomplexVal_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00001000;
}
dcomplexVal_.add(input.readDouble());
break;
}
case 98: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00001000) == 0x00001000) && input.getBytesUntilLimit() > 0) {
dcomplexVal_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00001000;
}
while (input.getBytesUntilLimit() > 0) {
dcomplexVal_.add(input.readDouble());
}
input.popLimit(limit);
break;
}
case 104: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
halfVal_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
halfVal_.add(input.readInt32());
break;
}
case 106: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) {
halfVal_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
while (input.getBytesUntilLimit() > 0) {
halfVal_.add(input.readInt32());
}
input.popLimit(limit);
break;
}
case 114: {
if (!((mutable_bitField0_ & 0x00002000) == 0x00002000)) {
resourceHandleVal_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00002000;
}
resourceHandleVal_.add(
input.readMessage(org.tensorflow.framework.ResourceHandle.parser(), extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
floatVal_ = java.util.Collections.unmodifiableList(floatVal_);
}
if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
doubleVal_ = java.util.Collections.unmodifiableList(doubleVal_);
}
if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
intVal_ = java.util.Collections.unmodifiableList(intVal_);
}
if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
stringVal_ = java.util.Collections.unmodifiableList(stringVal_);
}
if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
scomplexVal_ = java.util.Collections.unmodifiableList(scomplexVal_);
}
if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
int64Val_ = java.util.Collections.unmodifiableList(int64Val_);
}
if (((mutable_bitField0_ & 0x00000800) == 0x00000800)) {
boolVal_ = java.util.Collections.unmodifiableList(boolVal_);
}
if (((mutable_bitField0_ & 0x00001000) == 0x00001000)) {
dcomplexVal_ = java.util.Collections.unmodifiableList(dcomplexVal_);
}
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
halfVal_ = java.util.Collections.unmodifiableList(halfVal_);
}
if (((mutable_bitField0_ & 0x00002000) == 0x00002000)) {
resourceHandleVal_ = java.util.Collections.unmodifiableList(resourceHandleVal_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.TensorProtos.internal_static_tensorflow_TensorProto_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.TensorProtos.internal_static_tensorflow_TensorProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.TensorProto.class, org.tensorflow.framework.TensorProto.Builder.class);
}
private int bitField0_;
public static final int DTYPE_FIELD_NUMBER = 1;
private int dtype_;
/**
* optional .tensorflow.DataType dtype = 1;
*/
public int getDtypeValue() {
return dtype_;
}
/**
* optional .tensorflow.DataType dtype = 1;
*/
public org.tensorflow.framework.DataType getDtype() {
org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(dtype_);
return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result;
}
public static final int TENSOR_SHAPE_FIELD_NUMBER = 2;
private org.tensorflow.framework.TensorShapeProto tensorShape_;
/**
*
* Shape of the tensor. TODO(touts): sort out the 0-rank issues.
*
*
* optional .tensorflow.TensorShapeProto tensor_shape = 2;
*/
public boolean hasTensorShape() {
return tensorShape_ != null;
}
/**
*
* Shape of the tensor. TODO(touts): sort out the 0-rank issues.
*
*
* optional .tensorflow.TensorShapeProto tensor_shape = 2;
*/
public org.tensorflow.framework.TensorShapeProto getTensorShape() {
return tensorShape_ == null ? org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : tensorShape_;
}
/**
*
* Shape of the tensor. TODO(touts): sort out the 0-rank issues.
*
*
* optional .tensorflow.TensorShapeProto tensor_shape = 2;
*/
public org.tensorflow.framework.TensorShapeProtoOrBuilder getTensorShapeOrBuilder() {
return getTensorShape();
}
public static final int VERSION_NUMBER_FIELD_NUMBER = 3;
private int versionNumber_;
/**
*
* Version number.
* In version 0, if the "repeated xxx" representations contain only one
* element, that element is repeated to fill the shape. This makes it easy
* to represent a constant Tensor with a single value.
*
*
* optional int32 version_number = 3;
*/
public int getVersionNumber() {
return versionNumber_;
}
public static final int TENSOR_CONTENT_FIELD_NUMBER = 4;
private com.google.protobuf.ByteString tensorContent_;
/**
*
* Serialized raw tensor content from either Tensor::AsProtoTensorContent or
* memcpy in tensorflow::grpc::EncodeTensorToByteBuffer. This representation
* can be used for all tensor types. The purpose of this representation is to
* reduce serialization overhead during RPC call by avoiding serialization of
* many repeated small items.
*
*
* optional bytes tensor_content = 4;
*/
public com.google.protobuf.ByteString getTensorContent() {
return tensorContent_;
}
public static final int HALF_VAL_FIELD_NUMBER = 13;
private java.util.List halfVal_;
/**
*
* DT_HALF. Note that since protobuf has no int16 type, we'll have some
* pointless zero padding for each value here.
*
*
* repeated int32 half_val = 13 [packed = true];
*/
public java.util.List
getHalfValList() {
return halfVal_;
}
/**
*
* DT_HALF. Note that since protobuf has no int16 type, we'll have some
* pointless zero padding for each value here.
*
*
* repeated int32 half_val = 13 [packed = true];
*/
public int getHalfValCount() {
return halfVal_.size();
}
/**
*
* DT_HALF. Note that since protobuf has no int16 type, we'll have some
* pointless zero padding for each value here.
*
*
* repeated int32 half_val = 13 [packed = true];
*/
public int getHalfVal(int index) {
return halfVal_.get(index);
}
private int halfValMemoizedSerializedSize = -1;
public static final int FLOAT_VAL_FIELD_NUMBER = 5;
private java.util.List floatVal_;
/**
*
* DT_FLOAT.
*
*
* repeated float float_val = 5 [packed = true];
*/
public java.util.List
getFloatValList() {
return floatVal_;
}
/**
*
* DT_FLOAT.
*
*
* repeated float float_val = 5 [packed = true];
*/
public int getFloatValCount() {
return floatVal_.size();
}
/**
*
* DT_FLOAT.
*
*
* repeated float float_val = 5 [packed = true];
*/
public float getFloatVal(int index) {
return floatVal_.get(index);
}
private int floatValMemoizedSerializedSize = -1;
public static final int DOUBLE_VAL_FIELD_NUMBER = 6;
private java.util.List doubleVal_;
/**
*
* DT_DOUBLE.
*
*
* repeated double double_val = 6 [packed = true];
*/
public java.util.List
getDoubleValList() {
return doubleVal_;
}
/**
*
* DT_DOUBLE.
*
*
* repeated double double_val = 6 [packed = true];
*/
public int getDoubleValCount() {
return doubleVal_.size();
}
/**
*
* DT_DOUBLE.
*
*
* repeated double double_val = 6 [packed = true];
*/
public double getDoubleVal(int index) {
return doubleVal_.get(index);
}
private int doubleValMemoizedSerializedSize = -1;
public static final int INT_VAL_FIELD_NUMBER = 7;
private java.util.List intVal_;
/**
*
* DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
*
*
* repeated int32 int_val = 7 [packed = true];
*/
public java.util.List
getIntValList() {
return intVal_;
}
/**
*
* DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
*
*
* repeated int32 int_val = 7 [packed = true];
*/
public int getIntValCount() {
return intVal_.size();
}
/**
*
* DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
*
*
* repeated int32 int_val = 7 [packed = true];
*/
public int getIntVal(int index) {
return intVal_.get(index);
}
private int intValMemoizedSerializedSize = -1;
public static final int STRING_VAL_FIELD_NUMBER = 8;
private java.util.List stringVal_;
/**
*
* DT_STRING
*
*
* repeated bytes string_val = 8;
*/
public java.util.List
getStringValList() {
return stringVal_;
}
/**
*
* DT_STRING
*
*
* repeated bytes string_val = 8;
*/
public int getStringValCount() {
return stringVal_.size();
}
/**
*
* DT_STRING
*
*
* repeated bytes string_val = 8;
*/
public com.google.protobuf.ByteString getStringVal(int index) {
return stringVal_.get(index);
}
public static final int SCOMPLEX_VAL_FIELD_NUMBER = 9;
private java.util.List scomplexVal_;
/**
*
* DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
* and imaginary parts of i-th single precision complex.
*
*
* repeated float scomplex_val = 9 [packed = true];
*/
public java.util.List
getScomplexValList() {
return scomplexVal_;
}
/**
*
* DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
* and imaginary parts of i-th single precision complex.
*
*
* repeated float scomplex_val = 9 [packed = true];
*/
public int getScomplexValCount() {
return scomplexVal_.size();
}
/**
*
* DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
* and imaginary parts of i-th single precision complex.
*
*
* repeated float scomplex_val = 9 [packed = true];
*/
public float getScomplexVal(int index) {
return scomplexVal_.get(index);
}
private int scomplexValMemoizedSerializedSize = -1;
public static final int INT64_VAL_FIELD_NUMBER = 10;
private java.util.List int64Val_;
/**
*
* DT_INT64
*
*
* repeated int64 int64_val = 10 [packed = true];
*/
public java.util.List
getInt64ValList() {
return int64Val_;
}
/**
*
* DT_INT64
*
*
* repeated int64 int64_val = 10 [packed = true];
*/
public int getInt64ValCount() {
return int64Val_.size();
}
/**
*
* DT_INT64
*
*
* repeated int64 int64_val = 10 [packed = true];
*/
public long getInt64Val(int index) {
return int64Val_.get(index);
}
private int int64ValMemoizedSerializedSize = -1;
public static final int BOOL_VAL_FIELD_NUMBER = 11;
private java.util.List boolVal_;
/**
*
* DT_BOOL
*
*
* repeated bool bool_val = 11 [packed = true];
*/
public java.util.List
getBoolValList() {
return boolVal_;
}
/**
*
* DT_BOOL
*
*
* repeated bool bool_val = 11 [packed = true];
*/
public int getBoolValCount() {
return boolVal_.size();
}
/**
*
* DT_BOOL
*
*
* repeated bool bool_val = 11 [packed = true];
*/
public boolean getBoolVal(int index) {
return boolVal_.get(index);
}
private int boolValMemoizedSerializedSize = -1;
public static final int DCOMPLEX_VAL_FIELD_NUMBER = 12;
private java.util.List dcomplexVal_;
/**
*
* DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real
* and imaginary parts of i-th double precision complex.
*
*
* repeated double dcomplex_val = 12 [packed = true];
*/
public java.util.List
getDcomplexValList() {
return dcomplexVal_;
}
/**
*
* DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real
* and imaginary parts of i-th double precision complex.
*
*
* repeated double dcomplex_val = 12 [packed = true];
*/
public int getDcomplexValCount() {
return dcomplexVal_.size();
}
/**
*
* DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real
* and imaginary parts of i-th double precision complex.
*
*
* repeated double dcomplex_val = 12 [packed = true];
*/
public double getDcomplexVal(int index) {
return dcomplexVal_.get(index);
}
private int dcomplexValMemoizedSerializedSize = -1;
public static final int RESOURCE_HANDLE_VAL_FIELD_NUMBER = 14;
private java.util.List resourceHandleVal_;
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public java.util.List getResourceHandleValList() {
return resourceHandleVal_;
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public java.util.List extends org.tensorflow.framework.ResourceHandleOrBuilder>
getResourceHandleValOrBuilderList() {
return resourceHandleVal_;
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public int getResourceHandleValCount() {
return resourceHandleVal_.size();
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public org.tensorflow.framework.ResourceHandle getResourceHandleVal(int index) {
return resourceHandleVal_.get(index);
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public org.tensorflow.framework.ResourceHandleOrBuilder getResourceHandleValOrBuilder(
int index) {
return resourceHandleVal_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (dtype_ != org.tensorflow.framework.DataType.DT_INVALID.getNumber()) {
output.writeEnum(1, dtype_);
}
if (tensorShape_ != null) {
output.writeMessage(2, getTensorShape());
}
if (versionNumber_ != 0) {
output.writeInt32(3, versionNumber_);
}
if (!tensorContent_.isEmpty()) {
output.writeBytes(4, tensorContent_);
}
if (getFloatValList().size() > 0) {
output.writeUInt32NoTag(42);
output.writeUInt32NoTag(floatValMemoizedSerializedSize);
}
for (int i = 0; i < floatVal_.size(); i++) {
output.writeFloatNoTag(floatVal_.get(i));
}
if (getDoubleValList().size() > 0) {
output.writeUInt32NoTag(50);
output.writeUInt32NoTag(doubleValMemoizedSerializedSize);
}
for (int i = 0; i < doubleVal_.size(); i++) {
output.writeDoubleNoTag(doubleVal_.get(i));
}
if (getIntValList().size() > 0) {
output.writeUInt32NoTag(58);
output.writeUInt32NoTag(intValMemoizedSerializedSize);
}
for (int i = 0; i < intVal_.size(); i++) {
output.writeInt32NoTag(intVal_.get(i));
}
for (int i = 0; i < stringVal_.size(); i++) {
output.writeBytes(8, stringVal_.get(i));
}
if (getScomplexValList().size() > 0) {
output.writeUInt32NoTag(74);
output.writeUInt32NoTag(scomplexValMemoizedSerializedSize);
}
for (int i = 0; i < scomplexVal_.size(); i++) {
output.writeFloatNoTag(scomplexVal_.get(i));
}
if (getInt64ValList().size() > 0) {
output.writeUInt32NoTag(82);
output.writeUInt32NoTag(int64ValMemoizedSerializedSize);
}
for (int i = 0; i < int64Val_.size(); i++) {
output.writeInt64NoTag(int64Val_.get(i));
}
if (getBoolValList().size() > 0) {
output.writeUInt32NoTag(90);
output.writeUInt32NoTag(boolValMemoizedSerializedSize);
}
for (int i = 0; i < boolVal_.size(); i++) {
output.writeBoolNoTag(boolVal_.get(i));
}
if (getDcomplexValList().size() > 0) {
output.writeUInt32NoTag(98);
output.writeUInt32NoTag(dcomplexValMemoizedSerializedSize);
}
for (int i = 0; i < dcomplexVal_.size(); i++) {
output.writeDoubleNoTag(dcomplexVal_.get(i));
}
if (getHalfValList().size() > 0) {
output.writeUInt32NoTag(106);
output.writeUInt32NoTag(halfValMemoizedSerializedSize);
}
for (int i = 0; i < halfVal_.size(); i++) {
output.writeInt32NoTag(halfVal_.get(i));
}
for (int i = 0; i < resourceHandleVal_.size(); i++) {
output.writeMessage(14, resourceHandleVal_.get(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (dtype_ != org.tensorflow.framework.DataType.DT_INVALID.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, dtype_);
}
if (tensorShape_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getTensorShape());
}
if (versionNumber_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, versionNumber_);
}
if (!tensorContent_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, tensorContent_);
}
{
int dataSize = 0;
dataSize = 4 * getFloatValList().size();
size += dataSize;
if (!getFloatValList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
floatValMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
dataSize = 8 * getDoubleValList().size();
size += dataSize;
if (!getDoubleValList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
doubleValMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < intVal_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(intVal_.get(i));
}
size += dataSize;
if (!getIntValList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
intValMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < stringVal_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(stringVal_.get(i));
}
size += dataSize;
size += 1 * getStringValList().size();
}
{
int dataSize = 0;
dataSize = 4 * getScomplexValList().size();
size += dataSize;
if (!getScomplexValList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
scomplexValMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < int64Val_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(int64Val_.get(i));
}
size += dataSize;
if (!getInt64ValList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
int64ValMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
dataSize = 1 * getBoolValList().size();
size += dataSize;
if (!getBoolValList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
boolValMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
dataSize = 8 * getDcomplexValList().size();
size += dataSize;
if (!getDcomplexValList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
dcomplexValMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < halfVal_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(halfVal_.get(i));
}
size += dataSize;
if (!getHalfValList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
halfValMemoizedSerializedSize = dataSize;
}
for (int i = 0; i < resourceHandleVal_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, resourceHandleVal_.get(i));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.tensorflow.framework.TensorProto)) {
return super.equals(obj);
}
org.tensorflow.framework.TensorProto other = (org.tensorflow.framework.TensorProto) obj;
boolean result = true;
result = result && dtype_ == other.dtype_;
result = result && (hasTensorShape() == other.hasTensorShape());
if (hasTensorShape()) {
result = result && getTensorShape()
.equals(other.getTensorShape());
}
result = result && (getVersionNumber()
== other.getVersionNumber());
result = result && getTensorContent()
.equals(other.getTensorContent());
result = result && getHalfValList()
.equals(other.getHalfValList());
result = result && getFloatValList()
.equals(other.getFloatValList());
result = result && getDoubleValList()
.equals(other.getDoubleValList());
result = result && getIntValList()
.equals(other.getIntValList());
result = result && getStringValList()
.equals(other.getStringValList());
result = result && getScomplexValList()
.equals(other.getScomplexValList());
result = result && getInt64ValList()
.equals(other.getInt64ValList());
result = result && getBoolValList()
.equals(other.getBoolValList());
result = result && getDcomplexValList()
.equals(other.getDcomplexValList());
result = result && getResourceHandleValList()
.equals(other.getResourceHandleValList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + DTYPE_FIELD_NUMBER;
hash = (53 * hash) + dtype_;
if (hasTensorShape()) {
hash = (37 * hash) + TENSOR_SHAPE_FIELD_NUMBER;
hash = (53 * hash) + getTensorShape().hashCode();
}
hash = (37 * hash) + VERSION_NUMBER_FIELD_NUMBER;
hash = (53 * hash) + getVersionNumber();
hash = (37 * hash) + TENSOR_CONTENT_FIELD_NUMBER;
hash = (53 * hash) + getTensorContent().hashCode();
if (getHalfValCount() > 0) {
hash = (37 * hash) + HALF_VAL_FIELD_NUMBER;
hash = (53 * hash) + getHalfValList().hashCode();
}
if (getFloatValCount() > 0) {
hash = (37 * hash) + FLOAT_VAL_FIELD_NUMBER;
hash = (53 * hash) + getFloatValList().hashCode();
}
if (getDoubleValCount() > 0) {
hash = (37 * hash) + DOUBLE_VAL_FIELD_NUMBER;
hash = (53 * hash) + getDoubleValList().hashCode();
}
if (getIntValCount() > 0) {
hash = (37 * hash) + INT_VAL_FIELD_NUMBER;
hash = (53 * hash) + getIntValList().hashCode();
}
if (getStringValCount() > 0) {
hash = (37 * hash) + STRING_VAL_FIELD_NUMBER;
hash = (53 * hash) + getStringValList().hashCode();
}
if (getScomplexValCount() > 0) {
hash = (37 * hash) + SCOMPLEX_VAL_FIELD_NUMBER;
hash = (53 * hash) + getScomplexValList().hashCode();
}
if (getInt64ValCount() > 0) {
hash = (37 * hash) + INT64_VAL_FIELD_NUMBER;
hash = (53 * hash) + getInt64ValList().hashCode();
}
if (getBoolValCount() > 0) {
hash = (37 * hash) + BOOL_VAL_FIELD_NUMBER;
hash = (53 * hash) + getBoolValList().hashCode();
}
if (getDcomplexValCount() > 0) {
hash = (37 * hash) + DCOMPLEX_VAL_FIELD_NUMBER;
hash = (53 * hash) + getDcomplexValList().hashCode();
}
if (getResourceHandleValCount() > 0) {
hash = (37 * hash) + RESOURCE_HANDLE_VAL_FIELD_NUMBER;
hash = (53 * hash) + getResourceHandleValList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.TensorProto parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TensorProto parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.TensorProto parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TensorProto parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.TensorProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TensorProto parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.TensorProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TensorProto parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.TensorProto parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TensorProto parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tensorflow.framework.TensorProto prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Protocol buffer representing a tensor.
*
*
* Protobuf type {@code tensorflow.TensorProto}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.TensorProto)
org.tensorflow.framework.TensorProtoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.TensorProtos.internal_static_tensorflow_TensorProto_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.TensorProtos.internal_static_tensorflow_TensorProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.TensorProto.class, org.tensorflow.framework.TensorProto.Builder.class);
}
// Construct using org.tensorflow.framework.TensorProto.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getResourceHandleValFieldBuilder();
}
}
public Builder clear() {
super.clear();
dtype_ = 0;
if (tensorShapeBuilder_ == null) {
tensorShape_ = null;
} else {
tensorShape_ = null;
tensorShapeBuilder_ = null;
}
versionNumber_ = 0;
tensorContent_ = com.google.protobuf.ByteString.EMPTY;
halfVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
floatVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
doubleVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
intVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
stringVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
scomplexVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000200);
int64Val_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000400);
boolVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000800);
dcomplexVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00001000);
if (resourceHandleValBuilder_ == null) {
resourceHandleVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00002000);
} else {
resourceHandleValBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.TensorProtos.internal_static_tensorflow_TensorProto_descriptor;
}
public org.tensorflow.framework.TensorProto getDefaultInstanceForType() {
return org.tensorflow.framework.TensorProto.getDefaultInstance();
}
public org.tensorflow.framework.TensorProto build() {
org.tensorflow.framework.TensorProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tensorflow.framework.TensorProto buildPartial() {
org.tensorflow.framework.TensorProto result = new org.tensorflow.framework.TensorProto(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.dtype_ = dtype_;
if (tensorShapeBuilder_ == null) {
result.tensorShape_ = tensorShape_;
} else {
result.tensorShape_ = tensorShapeBuilder_.build();
}
result.versionNumber_ = versionNumber_;
result.tensorContent_ = tensorContent_;
if (((bitField0_ & 0x00000010) == 0x00000010)) {
halfVal_ = java.util.Collections.unmodifiableList(halfVal_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.halfVal_ = halfVal_;
if (((bitField0_ & 0x00000020) == 0x00000020)) {
floatVal_ = java.util.Collections.unmodifiableList(floatVal_);
bitField0_ = (bitField0_ & ~0x00000020);
}
result.floatVal_ = floatVal_;
if (((bitField0_ & 0x00000040) == 0x00000040)) {
doubleVal_ = java.util.Collections.unmodifiableList(doubleVal_);
bitField0_ = (bitField0_ & ~0x00000040);
}
result.doubleVal_ = doubleVal_;
if (((bitField0_ & 0x00000080) == 0x00000080)) {
intVal_ = java.util.Collections.unmodifiableList(intVal_);
bitField0_ = (bitField0_ & ~0x00000080);
}
result.intVal_ = intVal_;
if (((bitField0_ & 0x00000100) == 0x00000100)) {
stringVal_ = java.util.Collections.unmodifiableList(stringVal_);
bitField0_ = (bitField0_ & ~0x00000100);
}
result.stringVal_ = stringVal_;
if (((bitField0_ & 0x00000200) == 0x00000200)) {
scomplexVal_ = java.util.Collections.unmodifiableList(scomplexVal_);
bitField0_ = (bitField0_ & ~0x00000200);
}
result.scomplexVal_ = scomplexVal_;
if (((bitField0_ & 0x00000400) == 0x00000400)) {
int64Val_ = java.util.Collections.unmodifiableList(int64Val_);
bitField0_ = (bitField0_ & ~0x00000400);
}
result.int64Val_ = int64Val_;
if (((bitField0_ & 0x00000800) == 0x00000800)) {
boolVal_ = java.util.Collections.unmodifiableList(boolVal_);
bitField0_ = (bitField0_ & ~0x00000800);
}
result.boolVal_ = boolVal_;
if (((bitField0_ & 0x00001000) == 0x00001000)) {
dcomplexVal_ = java.util.Collections.unmodifiableList(dcomplexVal_);
bitField0_ = (bitField0_ & ~0x00001000);
}
result.dcomplexVal_ = dcomplexVal_;
if (resourceHandleValBuilder_ == null) {
if (((bitField0_ & 0x00002000) == 0x00002000)) {
resourceHandleVal_ = java.util.Collections.unmodifiableList(resourceHandleVal_);
bitField0_ = (bitField0_ & ~0x00002000);
}
result.resourceHandleVal_ = resourceHandleVal_;
} else {
result.resourceHandleVal_ = resourceHandleValBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tensorflow.framework.TensorProto) {
return mergeFrom((org.tensorflow.framework.TensorProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.TensorProto other) {
if (other == org.tensorflow.framework.TensorProto.getDefaultInstance()) return this;
if (other.dtype_ != 0) {
setDtypeValue(other.getDtypeValue());
}
if (other.hasTensorShape()) {
mergeTensorShape(other.getTensorShape());
}
if (other.getVersionNumber() != 0) {
setVersionNumber(other.getVersionNumber());
}
if (other.getTensorContent() != com.google.protobuf.ByteString.EMPTY) {
setTensorContent(other.getTensorContent());
}
if (!other.halfVal_.isEmpty()) {
if (halfVal_.isEmpty()) {
halfVal_ = other.halfVal_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureHalfValIsMutable();
halfVal_.addAll(other.halfVal_);
}
onChanged();
}
if (!other.floatVal_.isEmpty()) {
if (floatVal_.isEmpty()) {
floatVal_ = other.floatVal_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureFloatValIsMutable();
floatVal_.addAll(other.floatVal_);
}
onChanged();
}
if (!other.doubleVal_.isEmpty()) {
if (doubleVal_.isEmpty()) {
doubleVal_ = other.doubleVal_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureDoubleValIsMutable();
doubleVal_.addAll(other.doubleVal_);
}
onChanged();
}
if (!other.intVal_.isEmpty()) {
if (intVal_.isEmpty()) {
intVal_ = other.intVal_;
bitField0_ = (bitField0_ & ~0x00000080);
} else {
ensureIntValIsMutable();
intVal_.addAll(other.intVal_);
}
onChanged();
}
if (!other.stringVal_.isEmpty()) {
if (stringVal_.isEmpty()) {
stringVal_ = other.stringVal_;
bitField0_ = (bitField0_ & ~0x00000100);
} else {
ensureStringValIsMutable();
stringVal_.addAll(other.stringVal_);
}
onChanged();
}
if (!other.scomplexVal_.isEmpty()) {
if (scomplexVal_.isEmpty()) {
scomplexVal_ = other.scomplexVal_;
bitField0_ = (bitField0_ & ~0x00000200);
} else {
ensureScomplexValIsMutable();
scomplexVal_.addAll(other.scomplexVal_);
}
onChanged();
}
if (!other.int64Val_.isEmpty()) {
if (int64Val_.isEmpty()) {
int64Val_ = other.int64Val_;
bitField0_ = (bitField0_ & ~0x00000400);
} else {
ensureInt64ValIsMutable();
int64Val_.addAll(other.int64Val_);
}
onChanged();
}
if (!other.boolVal_.isEmpty()) {
if (boolVal_.isEmpty()) {
boolVal_ = other.boolVal_;
bitField0_ = (bitField0_ & ~0x00000800);
} else {
ensureBoolValIsMutable();
boolVal_.addAll(other.boolVal_);
}
onChanged();
}
if (!other.dcomplexVal_.isEmpty()) {
if (dcomplexVal_.isEmpty()) {
dcomplexVal_ = other.dcomplexVal_;
bitField0_ = (bitField0_ & ~0x00001000);
} else {
ensureDcomplexValIsMutable();
dcomplexVal_.addAll(other.dcomplexVal_);
}
onChanged();
}
if (resourceHandleValBuilder_ == null) {
if (!other.resourceHandleVal_.isEmpty()) {
if (resourceHandleVal_.isEmpty()) {
resourceHandleVal_ = other.resourceHandleVal_;
bitField0_ = (bitField0_ & ~0x00002000);
} else {
ensureResourceHandleValIsMutable();
resourceHandleVal_.addAll(other.resourceHandleVal_);
}
onChanged();
}
} else {
if (!other.resourceHandleVal_.isEmpty()) {
if (resourceHandleValBuilder_.isEmpty()) {
resourceHandleValBuilder_.dispose();
resourceHandleValBuilder_ = null;
resourceHandleVal_ = other.resourceHandleVal_;
bitField0_ = (bitField0_ & ~0x00002000);
resourceHandleValBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getResourceHandleValFieldBuilder() : null;
} else {
resourceHandleValBuilder_.addAllMessages(other.resourceHandleVal_);
}
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.TensorProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.TensorProto) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int dtype_ = 0;
/**
* optional .tensorflow.DataType dtype = 1;
*/
public int getDtypeValue() {
return dtype_;
}
/**
* optional .tensorflow.DataType dtype = 1;
*/
public Builder setDtypeValue(int value) {
dtype_ = value;
onChanged();
return this;
}
/**
* optional .tensorflow.DataType dtype = 1;
*/
public org.tensorflow.framework.DataType getDtype() {
org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(dtype_);
return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result;
}
/**
* optional .tensorflow.DataType dtype = 1;
*/
public Builder setDtype(org.tensorflow.framework.DataType value) {
if (value == null) {
throw new NullPointerException();
}
dtype_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .tensorflow.DataType dtype = 1;
*/
public Builder clearDtype() {
dtype_ = 0;
onChanged();
return this;
}
private org.tensorflow.framework.TensorShapeProto tensorShape_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> tensorShapeBuilder_;
/**
*
* Shape of the tensor. TODO(touts): sort out the 0-rank issues.
*
*
* optional .tensorflow.TensorShapeProto tensor_shape = 2;
*/
public boolean hasTensorShape() {
return tensorShapeBuilder_ != null || tensorShape_ != null;
}
/**
*
* Shape of the tensor. TODO(touts): sort out the 0-rank issues.
*
*
* optional .tensorflow.TensorShapeProto tensor_shape = 2;
*/
public org.tensorflow.framework.TensorShapeProto getTensorShape() {
if (tensorShapeBuilder_ == null) {
return tensorShape_ == null ? org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : tensorShape_;
} else {
return tensorShapeBuilder_.getMessage();
}
}
/**
*
* Shape of the tensor. TODO(touts): sort out the 0-rank issues.
*
*
* optional .tensorflow.TensorShapeProto tensor_shape = 2;
*/
public Builder setTensorShape(org.tensorflow.framework.TensorShapeProto value) {
if (tensorShapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tensorShape_ = value;
onChanged();
} else {
tensorShapeBuilder_.setMessage(value);
}
return this;
}
/**
*
* Shape of the tensor. TODO(touts): sort out the 0-rank issues.
*
*
* optional .tensorflow.TensorShapeProto tensor_shape = 2;
*/
public Builder setTensorShape(
org.tensorflow.framework.TensorShapeProto.Builder builderForValue) {
if (tensorShapeBuilder_ == null) {
tensorShape_ = builderForValue.build();
onChanged();
} else {
tensorShapeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Shape of the tensor. TODO(touts): sort out the 0-rank issues.
*
*
* optional .tensorflow.TensorShapeProto tensor_shape = 2;
*/
public Builder mergeTensorShape(org.tensorflow.framework.TensorShapeProto value) {
if (tensorShapeBuilder_ == null) {
if (tensorShape_ != null) {
tensorShape_ =
org.tensorflow.framework.TensorShapeProto.newBuilder(tensorShape_).mergeFrom(value).buildPartial();
} else {
tensorShape_ = value;
}
onChanged();
} else {
tensorShapeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Shape of the tensor. TODO(touts): sort out the 0-rank issues.
*
*
* optional .tensorflow.TensorShapeProto tensor_shape = 2;
*/
public Builder clearTensorShape() {
if (tensorShapeBuilder_ == null) {
tensorShape_ = null;
onChanged();
} else {
tensorShape_ = null;
tensorShapeBuilder_ = null;
}
return this;
}
/**
*
* Shape of the tensor. TODO(touts): sort out the 0-rank issues.
*
*
* optional .tensorflow.TensorShapeProto tensor_shape = 2;
*/
public org.tensorflow.framework.TensorShapeProto.Builder getTensorShapeBuilder() {
onChanged();
return getTensorShapeFieldBuilder().getBuilder();
}
/**
*
* Shape of the tensor. TODO(touts): sort out the 0-rank issues.
*
*
* optional .tensorflow.TensorShapeProto tensor_shape = 2;
*/
public org.tensorflow.framework.TensorShapeProtoOrBuilder getTensorShapeOrBuilder() {
if (tensorShapeBuilder_ != null) {
return tensorShapeBuilder_.getMessageOrBuilder();
} else {
return tensorShape_ == null ?
org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : tensorShape_;
}
}
/**
*
* Shape of the tensor. TODO(touts): sort out the 0-rank issues.
*
*
* optional .tensorflow.TensorShapeProto tensor_shape = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>
getTensorShapeFieldBuilder() {
if (tensorShapeBuilder_ == null) {
tensorShapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>(
getTensorShape(),
getParentForChildren(),
isClean());
tensorShape_ = null;
}
return tensorShapeBuilder_;
}
private int versionNumber_ ;
/**
*
* Version number.
* In version 0, if the "repeated xxx" representations contain only one
* element, that element is repeated to fill the shape. This makes it easy
* to represent a constant Tensor with a single value.
*
*
* optional int32 version_number = 3;
*/
public int getVersionNumber() {
return versionNumber_;
}
/**
*
* Version number.
* In version 0, if the "repeated xxx" representations contain only one
* element, that element is repeated to fill the shape. This makes it easy
* to represent a constant Tensor with a single value.
*
*
* optional int32 version_number = 3;
*/
public Builder setVersionNumber(int value) {
versionNumber_ = value;
onChanged();
return this;
}
/**
*
* Version number.
* In version 0, if the "repeated xxx" representations contain only one
* element, that element is repeated to fill the shape. This makes it easy
* to represent a constant Tensor with a single value.
*
*
* optional int32 version_number = 3;
*/
public Builder clearVersionNumber() {
versionNumber_ = 0;
onChanged();
return this;
}
private com.google.protobuf.ByteString tensorContent_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Serialized raw tensor content from either Tensor::AsProtoTensorContent or
* memcpy in tensorflow::grpc::EncodeTensorToByteBuffer. This representation
* can be used for all tensor types. The purpose of this representation is to
* reduce serialization overhead during RPC call by avoiding serialization of
* many repeated small items.
*
*
* optional bytes tensor_content = 4;
*/
public com.google.protobuf.ByteString getTensorContent() {
return tensorContent_;
}
/**
*
* Serialized raw tensor content from either Tensor::AsProtoTensorContent or
* memcpy in tensorflow::grpc::EncodeTensorToByteBuffer. This representation
* can be used for all tensor types. The purpose of this representation is to
* reduce serialization overhead during RPC call by avoiding serialization of
* many repeated small items.
*
*
* optional bytes tensor_content = 4;
*/
public Builder setTensorContent(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
tensorContent_ = value;
onChanged();
return this;
}
/**
*
* Serialized raw tensor content from either Tensor::AsProtoTensorContent or
* memcpy in tensorflow::grpc::EncodeTensorToByteBuffer. This representation
* can be used for all tensor types. The purpose of this representation is to
* reduce serialization overhead during RPC call by avoiding serialization of
* many repeated small items.
*
*
* optional bytes tensor_content = 4;
*/
public Builder clearTensorContent() {
tensorContent_ = getDefaultInstance().getTensorContent();
onChanged();
return this;
}
private java.util.List halfVal_ = java.util.Collections.emptyList();
private void ensureHalfValIsMutable() {
if (!((bitField0_ & 0x00000010) == 0x00000010)) {
halfVal_ = new java.util.ArrayList(halfVal_);
bitField0_ |= 0x00000010;
}
}
/**
*
* DT_HALF. Note that since protobuf has no int16 type, we'll have some
* pointless zero padding for each value here.
*
*
* repeated int32 half_val = 13 [packed = true];
*/
public java.util.List
getHalfValList() {
return java.util.Collections.unmodifiableList(halfVal_);
}
/**
*
* DT_HALF. Note that since protobuf has no int16 type, we'll have some
* pointless zero padding for each value here.
*
*
* repeated int32 half_val = 13 [packed = true];
*/
public int getHalfValCount() {
return halfVal_.size();
}
/**
*
* DT_HALF. Note that since protobuf has no int16 type, we'll have some
* pointless zero padding for each value here.
*
*
* repeated int32 half_val = 13 [packed = true];
*/
public int getHalfVal(int index) {
return halfVal_.get(index);
}
/**
*
* DT_HALF. Note that since protobuf has no int16 type, we'll have some
* pointless zero padding for each value here.
*
*
* repeated int32 half_val = 13 [packed = true];
*/
public Builder setHalfVal(
int index, int value) {
ensureHalfValIsMutable();
halfVal_.set(index, value);
onChanged();
return this;
}
/**
*
* DT_HALF. Note that since protobuf has no int16 type, we'll have some
* pointless zero padding for each value here.
*
*
* repeated int32 half_val = 13 [packed = true];
*/
public Builder addHalfVal(int value) {
ensureHalfValIsMutable();
halfVal_.add(value);
onChanged();
return this;
}
/**
*
* DT_HALF. Note that since protobuf has no int16 type, we'll have some
* pointless zero padding for each value here.
*
*
* repeated int32 half_val = 13 [packed = true];
*/
public Builder addAllHalfVal(
java.lang.Iterable extends java.lang.Integer> values) {
ensureHalfValIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, halfVal_);
onChanged();
return this;
}
/**
*
* DT_HALF. Note that since protobuf has no int16 type, we'll have some
* pointless zero padding for each value here.
*
*
* repeated int32 half_val = 13 [packed = true];
*/
public Builder clearHalfVal() {
halfVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
private java.util.List floatVal_ = java.util.Collections.emptyList();
private void ensureFloatValIsMutable() {
if (!((bitField0_ & 0x00000020) == 0x00000020)) {
floatVal_ = new java.util.ArrayList(floatVal_);
bitField0_ |= 0x00000020;
}
}
/**
*
* DT_FLOAT.
*
*
* repeated float float_val = 5 [packed = true];
*/
public java.util.List
getFloatValList() {
return java.util.Collections.unmodifiableList(floatVal_);
}
/**
*
* DT_FLOAT.
*
*
* repeated float float_val = 5 [packed = true];
*/
public int getFloatValCount() {
return floatVal_.size();
}
/**
*
* DT_FLOAT.
*
*
* repeated float float_val = 5 [packed = true];
*/
public float getFloatVal(int index) {
return floatVal_.get(index);
}
/**
*
* DT_FLOAT.
*
*
* repeated float float_val = 5 [packed = true];
*/
public Builder setFloatVal(
int index, float value) {
ensureFloatValIsMutable();
floatVal_.set(index, value);
onChanged();
return this;
}
/**
*
* DT_FLOAT.
*
*
* repeated float float_val = 5 [packed = true];
*/
public Builder addFloatVal(float value) {
ensureFloatValIsMutable();
floatVal_.add(value);
onChanged();
return this;
}
/**
*
* DT_FLOAT.
*
*
* repeated float float_val = 5 [packed = true];
*/
public Builder addAllFloatVal(
java.lang.Iterable extends java.lang.Float> values) {
ensureFloatValIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, floatVal_);
onChanged();
return this;
}
/**
*
* DT_FLOAT.
*
*
* repeated float float_val = 5 [packed = true];
*/
public Builder clearFloatVal() {
floatVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
private java.util.List doubleVal_ = java.util.Collections.emptyList();
private void ensureDoubleValIsMutable() {
if (!((bitField0_ & 0x00000040) == 0x00000040)) {
doubleVal_ = new java.util.ArrayList(doubleVal_);
bitField0_ |= 0x00000040;
}
}
/**
*
* DT_DOUBLE.
*
*
* repeated double double_val = 6 [packed = true];
*/
public java.util.List
getDoubleValList() {
return java.util.Collections.unmodifiableList(doubleVal_);
}
/**
*
* DT_DOUBLE.
*
*
* repeated double double_val = 6 [packed = true];
*/
public int getDoubleValCount() {
return doubleVal_.size();
}
/**
*
* DT_DOUBLE.
*
*
* repeated double double_val = 6 [packed = true];
*/
public double getDoubleVal(int index) {
return doubleVal_.get(index);
}
/**
*
* DT_DOUBLE.
*
*
* repeated double double_val = 6 [packed = true];
*/
public Builder setDoubleVal(
int index, double value) {
ensureDoubleValIsMutable();
doubleVal_.set(index, value);
onChanged();
return this;
}
/**
*
* DT_DOUBLE.
*
*
* repeated double double_val = 6 [packed = true];
*/
public Builder addDoubleVal(double value) {
ensureDoubleValIsMutable();
doubleVal_.add(value);
onChanged();
return this;
}
/**
*
* DT_DOUBLE.
*
*
* repeated double double_val = 6 [packed = true];
*/
public Builder addAllDoubleVal(
java.lang.Iterable extends java.lang.Double> values) {
ensureDoubleValIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, doubleVal_);
onChanged();
return this;
}
/**
*
* DT_DOUBLE.
*
*
* repeated double double_val = 6 [packed = true];
*/
public Builder clearDoubleVal() {
doubleVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
private java.util.List intVal_ = java.util.Collections.emptyList();
private void ensureIntValIsMutable() {
if (!((bitField0_ & 0x00000080) == 0x00000080)) {
intVal_ = new java.util.ArrayList(intVal_);
bitField0_ |= 0x00000080;
}
}
/**
*
* DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
*
*
* repeated int32 int_val = 7 [packed = true];
*/
public java.util.List
getIntValList() {
return java.util.Collections.unmodifiableList(intVal_);
}
/**
*
* DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
*
*
* repeated int32 int_val = 7 [packed = true];
*/
public int getIntValCount() {
return intVal_.size();
}
/**
*
* DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
*
*
* repeated int32 int_val = 7 [packed = true];
*/
public int getIntVal(int index) {
return intVal_.get(index);
}
/**
*
* DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
*
*
* repeated int32 int_val = 7 [packed = true];
*/
public Builder setIntVal(
int index, int value) {
ensureIntValIsMutable();
intVal_.set(index, value);
onChanged();
return this;
}
/**
*
* DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
*
*
* repeated int32 int_val = 7 [packed = true];
*/
public Builder addIntVal(int value) {
ensureIntValIsMutable();
intVal_.add(value);
onChanged();
return this;
}
/**
*
* DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
*
*
* repeated int32 int_val = 7 [packed = true];
*/
public Builder addAllIntVal(
java.lang.Iterable extends java.lang.Integer> values) {
ensureIntValIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, intVal_);
onChanged();
return this;
}
/**
*
* DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
*
*
* repeated int32 int_val = 7 [packed = true];
*/
public Builder clearIntVal() {
intVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
return this;
}
private java.util.List stringVal_ = java.util.Collections.emptyList();
private void ensureStringValIsMutable() {
if (!((bitField0_ & 0x00000100) == 0x00000100)) {
stringVal_ = new java.util.ArrayList(stringVal_);
bitField0_ |= 0x00000100;
}
}
/**
*
* DT_STRING
*
*
* repeated bytes string_val = 8;
*/
public java.util.List
getStringValList() {
return java.util.Collections.unmodifiableList(stringVal_);
}
/**
*
* DT_STRING
*
*
* repeated bytes string_val = 8;
*/
public int getStringValCount() {
return stringVal_.size();
}
/**
*
* DT_STRING
*
*
* repeated bytes string_val = 8;
*/
public com.google.protobuf.ByteString getStringVal(int index) {
return stringVal_.get(index);
}
/**
*
* DT_STRING
*
*
* repeated bytes string_val = 8;
*/
public Builder setStringVal(
int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureStringValIsMutable();
stringVal_.set(index, value);
onChanged();
return this;
}
/**
*
* DT_STRING
*
*
* repeated bytes string_val = 8;
*/
public Builder addStringVal(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureStringValIsMutable();
stringVal_.add(value);
onChanged();
return this;
}
/**
*
* DT_STRING
*
*
* repeated bytes string_val = 8;
*/
public Builder addAllStringVal(
java.lang.Iterable extends com.google.protobuf.ByteString> values) {
ensureStringValIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, stringVal_);
onChanged();
return this;
}
/**
*
* DT_STRING
*
*
* repeated bytes string_val = 8;
*/
public Builder clearStringVal() {
stringVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
return this;
}
private java.util.List scomplexVal_ = java.util.Collections.emptyList();
private void ensureScomplexValIsMutable() {
if (!((bitField0_ & 0x00000200) == 0x00000200)) {
scomplexVal_ = new java.util.ArrayList(scomplexVal_);
bitField0_ |= 0x00000200;
}
}
/**
*
* DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
* and imaginary parts of i-th single precision complex.
*
*
* repeated float scomplex_val = 9 [packed = true];
*/
public java.util.List
getScomplexValList() {
return java.util.Collections.unmodifiableList(scomplexVal_);
}
/**
*
* DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
* and imaginary parts of i-th single precision complex.
*
*
* repeated float scomplex_val = 9 [packed = true];
*/
public int getScomplexValCount() {
return scomplexVal_.size();
}
/**
*
* DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
* and imaginary parts of i-th single precision complex.
*
*
* repeated float scomplex_val = 9 [packed = true];
*/
public float getScomplexVal(int index) {
return scomplexVal_.get(index);
}
/**
*
* DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
* and imaginary parts of i-th single precision complex.
*
*
* repeated float scomplex_val = 9 [packed = true];
*/
public Builder setScomplexVal(
int index, float value) {
ensureScomplexValIsMutable();
scomplexVal_.set(index, value);
onChanged();
return this;
}
/**
*
* DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
* and imaginary parts of i-th single precision complex.
*
*
* repeated float scomplex_val = 9 [packed = true];
*/
public Builder addScomplexVal(float value) {
ensureScomplexValIsMutable();
scomplexVal_.add(value);
onChanged();
return this;
}
/**
*
* DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
* and imaginary parts of i-th single precision complex.
*
*
* repeated float scomplex_val = 9 [packed = true];
*/
public Builder addAllScomplexVal(
java.lang.Iterable extends java.lang.Float> values) {
ensureScomplexValIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, scomplexVal_);
onChanged();
return this;
}
/**
*
* DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
* and imaginary parts of i-th single precision complex.
*
*
* repeated float scomplex_val = 9 [packed = true];
*/
public Builder clearScomplexVal() {
scomplexVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
return this;
}
private java.util.List int64Val_ = java.util.Collections.emptyList();
private void ensureInt64ValIsMutable() {
if (!((bitField0_ & 0x00000400) == 0x00000400)) {
int64Val_ = new java.util.ArrayList(int64Val_);
bitField0_ |= 0x00000400;
}
}
/**
*
* DT_INT64
*
*
* repeated int64 int64_val = 10 [packed = true];
*/
public java.util.List
getInt64ValList() {
return java.util.Collections.unmodifiableList(int64Val_);
}
/**
*
* DT_INT64
*
*
* repeated int64 int64_val = 10 [packed = true];
*/
public int getInt64ValCount() {
return int64Val_.size();
}
/**
*
* DT_INT64
*
*
* repeated int64 int64_val = 10 [packed = true];
*/
public long getInt64Val(int index) {
return int64Val_.get(index);
}
/**
*
* DT_INT64
*
*
* repeated int64 int64_val = 10 [packed = true];
*/
public Builder setInt64Val(
int index, long value) {
ensureInt64ValIsMutable();
int64Val_.set(index, value);
onChanged();
return this;
}
/**
*
* DT_INT64
*
*
* repeated int64 int64_val = 10 [packed = true];
*/
public Builder addInt64Val(long value) {
ensureInt64ValIsMutable();
int64Val_.add(value);
onChanged();
return this;
}
/**
*
* DT_INT64
*
*
* repeated int64 int64_val = 10 [packed = true];
*/
public Builder addAllInt64Val(
java.lang.Iterable extends java.lang.Long> values) {
ensureInt64ValIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, int64Val_);
onChanged();
return this;
}
/**
*
* DT_INT64
*
*
* repeated int64 int64_val = 10 [packed = true];
*/
public Builder clearInt64Val() {
int64Val_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
return this;
}
private java.util.List boolVal_ = java.util.Collections.emptyList();
private void ensureBoolValIsMutable() {
if (!((bitField0_ & 0x00000800) == 0x00000800)) {
boolVal_ = new java.util.ArrayList(boolVal_);
bitField0_ |= 0x00000800;
}
}
/**
*
* DT_BOOL
*
*
* repeated bool bool_val = 11 [packed = true];
*/
public java.util.List
getBoolValList() {
return java.util.Collections.unmodifiableList(boolVal_);
}
/**
*
* DT_BOOL
*
*
* repeated bool bool_val = 11 [packed = true];
*/
public int getBoolValCount() {
return boolVal_.size();
}
/**
*
* DT_BOOL
*
*
* repeated bool bool_val = 11 [packed = true];
*/
public boolean getBoolVal(int index) {
return boolVal_.get(index);
}
/**
*
* DT_BOOL
*
*
* repeated bool bool_val = 11 [packed = true];
*/
public Builder setBoolVal(
int index, boolean value) {
ensureBoolValIsMutable();
boolVal_.set(index, value);
onChanged();
return this;
}
/**
*
* DT_BOOL
*
*
* repeated bool bool_val = 11 [packed = true];
*/
public Builder addBoolVal(boolean value) {
ensureBoolValIsMutable();
boolVal_.add(value);
onChanged();
return this;
}
/**
*
* DT_BOOL
*
*
* repeated bool bool_val = 11 [packed = true];
*/
public Builder addAllBoolVal(
java.lang.Iterable extends java.lang.Boolean> values) {
ensureBoolValIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, boolVal_);
onChanged();
return this;
}
/**
*
* DT_BOOL
*
*
* repeated bool bool_val = 11 [packed = true];
*/
public Builder clearBoolVal() {
boolVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000800);
onChanged();
return this;
}
private java.util.List dcomplexVal_ = java.util.Collections.emptyList();
private void ensureDcomplexValIsMutable() {
if (!((bitField0_ & 0x00001000) == 0x00001000)) {
dcomplexVal_ = new java.util.ArrayList(dcomplexVal_);
bitField0_ |= 0x00001000;
}
}
/**
*
* DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real
* and imaginary parts of i-th double precision complex.
*
*
* repeated double dcomplex_val = 12 [packed = true];
*/
public java.util.List
getDcomplexValList() {
return java.util.Collections.unmodifiableList(dcomplexVal_);
}
/**
*
* DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real
* and imaginary parts of i-th double precision complex.
*
*
* repeated double dcomplex_val = 12 [packed = true];
*/
public int getDcomplexValCount() {
return dcomplexVal_.size();
}
/**
*
* DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real
* and imaginary parts of i-th double precision complex.
*
*
* repeated double dcomplex_val = 12 [packed = true];
*/
public double getDcomplexVal(int index) {
return dcomplexVal_.get(index);
}
/**
*
* DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real
* and imaginary parts of i-th double precision complex.
*
*
* repeated double dcomplex_val = 12 [packed = true];
*/
public Builder setDcomplexVal(
int index, double value) {
ensureDcomplexValIsMutable();
dcomplexVal_.set(index, value);
onChanged();
return this;
}
/**
*
* DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real
* and imaginary parts of i-th double precision complex.
*
*
* repeated double dcomplex_val = 12 [packed = true];
*/
public Builder addDcomplexVal(double value) {
ensureDcomplexValIsMutable();
dcomplexVal_.add(value);
onChanged();
return this;
}
/**
*
* DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real
* and imaginary parts of i-th double precision complex.
*
*
* repeated double dcomplex_val = 12 [packed = true];
*/
public Builder addAllDcomplexVal(
java.lang.Iterable extends java.lang.Double> values) {
ensureDcomplexValIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, dcomplexVal_);
onChanged();
return this;
}
/**
*
* DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real
* and imaginary parts of i-th double precision complex.
*
*
* repeated double dcomplex_val = 12 [packed = true];
*/
public Builder clearDcomplexVal() {
dcomplexVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00001000);
onChanged();
return this;
}
private java.util.List resourceHandleVal_ =
java.util.Collections.emptyList();
private void ensureResourceHandleValIsMutable() {
if (!((bitField0_ & 0x00002000) == 0x00002000)) {
resourceHandleVal_ = new java.util.ArrayList(resourceHandleVal_);
bitField0_ |= 0x00002000;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.ResourceHandle, org.tensorflow.framework.ResourceHandle.Builder, org.tensorflow.framework.ResourceHandleOrBuilder> resourceHandleValBuilder_;
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public java.util.List getResourceHandleValList() {
if (resourceHandleValBuilder_ == null) {
return java.util.Collections.unmodifiableList(resourceHandleVal_);
} else {
return resourceHandleValBuilder_.getMessageList();
}
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public int getResourceHandleValCount() {
if (resourceHandleValBuilder_ == null) {
return resourceHandleVal_.size();
} else {
return resourceHandleValBuilder_.getCount();
}
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public org.tensorflow.framework.ResourceHandle getResourceHandleVal(int index) {
if (resourceHandleValBuilder_ == null) {
return resourceHandleVal_.get(index);
} else {
return resourceHandleValBuilder_.getMessage(index);
}
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public Builder setResourceHandleVal(
int index, org.tensorflow.framework.ResourceHandle value) {
if (resourceHandleValBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureResourceHandleValIsMutable();
resourceHandleVal_.set(index, value);
onChanged();
} else {
resourceHandleValBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public Builder setResourceHandleVal(
int index, org.tensorflow.framework.ResourceHandle.Builder builderForValue) {
if (resourceHandleValBuilder_ == null) {
ensureResourceHandleValIsMutable();
resourceHandleVal_.set(index, builderForValue.build());
onChanged();
} else {
resourceHandleValBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public Builder addResourceHandleVal(org.tensorflow.framework.ResourceHandle value) {
if (resourceHandleValBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureResourceHandleValIsMutable();
resourceHandleVal_.add(value);
onChanged();
} else {
resourceHandleValBuilder_.addMessage(value);
}
return this;
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public Builder addResourceHandleVal(
int index, org.tensorflow.framework.ResourceHandle value) {
if (resourceHandleValBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureResourceHandleValIsMutable();
resourceHandleVal_.add(index, value);
onChanged();
} else {
resourceHandleValBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public Builder addResourceHandleVal(
org.tensorflow.framework.ResourceHandle.Builder builderForValue) {
if (resourceHandleValBuilder_ == null) {
ensureResourceHandleValIsMutable();
resourceHandleVal_.add(builderForValue.build());
onChanged();
} else {
resourceHandleValBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public Builder addResourceHandleVal(
int index, org.tensorflow.framework.ResourceHandle.Builder builderForValue) {
if (resourceHandleValBuilder_ == null) {
ensureResourceHandleValIsMutable();
resourceHandleVal_.add(index, builderForValue.build());
onChanged();
} else {
resourceHandleValBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public Builder addAllResourceHandleVal(
java.lang.Iterable extends org.tensorflow.framework.ResourceHandle> values) {
if (resourceHandleValBuilder_ == null) {
ensureResourceHandleValIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, resourceHandleVal_);
onChanged();
} else {
resourceHandleValBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public Builder clearResourceHandleVal() {
if (resourceHandleValBuilder_ == null) {
resourceHandleVal_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00002000);
onChanged();
} else {
resourceHandleValBuilder_.clear();
}
return this;
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public Builder removeResourceHandleVal(int index) {
if (resourceHandleValBuilder_ == null) {
ensureResourceHandleValIsMutable();
resourceHandleVal_.remove(index);
onChanged();
} else {
resourceHandleValBuilder_.remove(index);
}
return this;
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public org.tensorflow.framework.ResourceHandle.Builder getResourceHandleValBuilder(
int index) {
return getResourceHandleValFieldBuilder().getBuilder(index);
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public org.tensorflow.framework.ResourceHandleOrBuilder getResourceHandleValOrBuilder(
int index) {
if (resourceHandleValBuilder_ == null) {
return resourceHandleVal_.get(index); } else {
return resourceHandleValBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public java.util.List extends org.tensorflow.framework.ResourceHandleOrBuilder>
getResourceHandleValOrBuilderList() {
if (resourceHandleValBuilder_ != null) {
return resourceHandleValBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(resourceHandleVal_);
}
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public org.tensorflow.framework.ResourceHandle.Builder addResourceHandleValBuilder() {
return getResourceHandleValFieldBuilder().addBuilder(
org.tensorflow.framework.ResourceHandle.getDefaultInstance());
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public org.tensorflow.framework.ResourceHandle.Builder addResourceHandleValBuilder(
int index) {
return getResourceHandleValFieldBuilder().addBuilder(
index, org.tensorflow.framework.ResourceHandle.getDefaultInstance());
}
/**
*
* DT_RESOURCE
*
*
* repeated .tensorflow.ResourceHandle resource_handle_val = 14;
*/
public java.util.List
getResourceHandleValBuilderList() {
return getResourceHandleValFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.ResourceHandle, org.tensorflow.framework.ResourceHandle.Builder, org.tensorflow.framework.ResourceHandleOrBuilder>
getResourceHandleValFieldBuilder() {
if (resourceHandleValBuilder_ == null) {
resourceHandleValBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.ResourceHandle, org.tensorflow.framework.ResourceHandle.Builder, org.tensorflow.framework.ResourceHandleOrBuilder>(
resourceHandleVal_,
((bitField0_ & 0x00002000) == 0x00002000),
getParentForChildren(),
isClean());
resourceHandleVal_ = null;
}
return resourceHandleValBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:tensorflow.TensorProto)
}
// @@protoc_insertion_point(class_scope:tensorflow.TensorProto)
private static final org.tensorflow.framework.TensorProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.TensorProto();
}
public static org.tensorflow.framework.TensorProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public TensorProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TensorProto(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tensorflow.framework.TensorProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}