All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tensorflow.framework.TensorShapeProto Maven / Gradle / Ivy

There is a newer version: 1.0.0-M2.1
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow/core/framework/tensor_shape.proto

package org.tensorflow.framework;

/**
 * 
 * Dimensions of a tensor.
 * 
* * Protobuf type {@code tensorflow.TensorShapeProto} */ public final class TensorShapeProto extends com.github.os72.protobuf351.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.TensorShapeProto) TensorShapeProtoOrBuilder { private static final long serialVersionUID = 0L; // Use TensorShapeProto.newBuilder() to construct. private TensorShapeProto(com.github.os72.protobuf351.GeneratedMessageV3.Builder builder) { super(builder); } private TensorShapeProto() { dim_ = java.util.Collections.emptyList(); unknownRank_ = false; } @java.lang.Override public final com.github.os72.protobuf351.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TensorShapeProto( com.github.os72.protobuf351.CodedInputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws com.github.os72.protobuf351.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.github.os72.protobuf351.UnknownFieldSet.Builder unknownFields = com.github.os72.protobuf351.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { dim_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } dim_.add( input.readMessage(org.tensorflow.framework.TensorShapeProto.Dim.parser(), extensionRegistry)); break; } case 24: { unknownRank_ = input.readBool(); break; } } } } catch (com.github.os72.protobuf351.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.github.os72.protobuf351.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { dim_ = java.util.Collections.unmodifiableList(dim_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.github.os72.protobuf351.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_descriptor; } protected com.github.os72.protobuf351.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.framework.TensorShapeProto.class, org.tensorflow.framework.TensorShapeProto.Builder.class); } public interface DimOrBuilder extends // @@protoc_insertion_point(interface_extends:tensorflow.TensorShapeProto.Dim) com.github.os72.protobuf351.MessageOrBuilder { /** *
     * Size of the tensor in that dimension.
     * This value must be >= -1, but values of -1 are reserved for "unknown"
     * shapes (values of -1 mean "unknown" dimension).  Certain wrappers
     * that work with TensorShapeProto may fail at runtime when deserializing
     * a TensorShapeProto containing a dim value of -1.
     * 
* * int64 size = 1; */ long getSize(); /** *
     * Optional name of the tensor dimension.
     * 
* * string name = 2; */ java.lang.String getName(); /** *
     * Optional name of the tensor dimension.
     * 
* * string name = 2; */ com.github.os72.protobuf351.ByteString getNameBytes(); } /** *
   * One dimension of the tensor.
   * 
* * Protobuf type {@code tensorflow.TensorShapeProto.Dim} */ public static final class Dim extends com.github.os72.protobuf351.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.TensorShapeProto.Dim) DimOrBuilder { private static final long serialVersionUID = 0L; // Use Dim.newBuilder() to construct. private Dim(com.github.os72.protobuf351.GeneratedMessageV3.Builder builder) { super(builder); } private Dim() { size_ = 0L; name_ = ""; } @java.lang.Override public final com.github.os72.protobuf351.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Dim( com.github.os72.protobuf351.CodedInputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws com.github.os72.protobuf351.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.github.os72.protobuf351.UnknownFieldSet.Builder unknownFields = com.github.os72.protobuf351.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { size_ = input.readInt64(); break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } } } } catch (com.github.os72.protobuf351.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.github.os72.protobuf351.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.github.os72.protobuf351.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_Dim_descriptor; } protected com.github.os72.protobuf351.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_Dim_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.framework.TensorShapeProto.Dim.class, org.tensorflow.framework.TensorShapeProto.Dim.Builder.class); } public static final int SIZE_FIELD_NUMBER = 1; private long size_; /** *
     * Size of the tensor in that dimension.
     * This value must be >= -1, but values of -1 are reserved for "unknown"
     * shapes (values of -1 mean "unknown" dimension).  Certain wrappers
     * that work with TensorShapeProto may fail at runtime when deserializing
     * a TensorShapeProto containing a dim value of -1.
     * 
* * int64 size = 1; */ public long getSize() { return size_; } public static final int NAME_FIELD_NUMBER = 2; private volatile java.lang.Object name_; /** *
     * Optional name of the tensor dimension.
     * 
* * string name = 2; */ public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.github.os72.protobuf351.ByteString bs = (com.github.os72.protobuf351.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** *
     * Optional name of the tensor dimension.
     * 
* * string name = 2; */ public com.github.os72.protobuf351.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.github.os72.protobuf351.ByteString b = com.github.os72.protobuf351.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.github.os72.protobuf351.ByteString) ref; } } 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.github.os72.protobuf351.CodedOutputStream output) throws java.io.IOException { if (size_ != 0L) { output.writeInt64(1, size_); } if (!getNameBytes().isEmpty()) { com.github.os72.protobuf351.GeneratedMessageV3.writeString(output, 2, name_); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (size_ != 0L) { size += com.github.os72.protobuf351.CodedOutputStream .computeInt64Size(1, size_); } if (!getNameBytes().isEmpty()) { size += com.github.os72.protobuf351.GeneratedMessageV3.computeStringSize(2, name_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.tensorflow.framework.TensorShapeProto.Dim)) { return super.equals(obj); } org.tensorflow.framework.TensorShapeProto.Dim other = (org.tensorflow.framework.TensorShapeProto.Dim) obj; boolean result = true; result = result && (getSize() == other.getSize()); result = result && getName() .equals(other.getName()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + SIZE_FIELD_NUMBER; hash = (53 * hash) + com.github.os72.protobuf351.Internal.hashLong( getSize()); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom( java.nio.ByteBuffer data) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom( java.nio.ByteBuffer data, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom( com.github.os72.protobuf351.ByteString data) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom( com.github.os72.protobuf351.ByteString data, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom(byte[] data) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom( byte[] data, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom(java.io.InputStream input) throws java.io.IOException { return com.github.os72.protobuf351.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom( java.io.InputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.github.os72.protobuf351.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.TensorShapeProto.Dim parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.github.os72.protobuf351.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.framework.TensorShapeProto.Dim parseDelimitedFrom( java.io.InputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.github.os72.protobuf351.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom( com.github.os72.protobuf351.CodedInputStream input) throws java.io.IOException { return com.github.os72.protobuf351.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom( com.github.os72.protobuf351.CodedInputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.github.os72.protobuf351.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.TensorShapeProto.Dim 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.github.os72.protobuf351.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * One dimension of the tensor.
     * 
* * Protobuf type {@code tensorflow.TensorShapeProto.Dim} */ public static final class Builder extends com.github.os72.protobuf351.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.TensorShapeProto.Dim) org.tensorflow.framework.TensorShapeProto.DimOrBuilder { public static final com.github.os72.protobuf351.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_Dim_descriptor; } protected com.github.os72.protobuf351.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_Dim_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.framework.TensorShapeProto.Dim.class, org.tensorflow.framework.TensorShapeProto.Dim.Builder.class); } // Construct using org.tensorflow.framework.TensorShapeProto.Dim.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.github.os72.protobuf351.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.github.os72.protobuf351.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); size_ = 0L; name_ = ""; return this; } public com.github.os72.protobuf351.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_Dim_descriptor; } public org.tensorflow.framework.TensorShapeProto.Dim getDefaultInstanceForType() { return org.tensorflow.framework.TensorShapeProto.Dim.getDefaultInstance(); } public org.tensorflow.framework.TensorShapeProto.Dim build() { org.tensorflow.framework.TensorShapeProto.Dim result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.tensorflow.framework.TensorShapeProto.Dim buildPartial() { org.tensorflow.framework.TensorShapeProto.Dim result = new org.tensorflow.framework.TensorShapeProto.Dim(this); result.size_ = size_; result.name_ = name_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.github.os72.protobuf351.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.github.os72.protobuf351.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.github.os72.protobuf351.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.github.os72.protobuf351.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.github.os72.protobuf351.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.github.os72.protobuf351.Message other) { if (other instanceof org.tensorflow.framework.TensorShapeProto.Dim) { return mergeFrom((org.tensorflow.framework.TensorShapeProto.Dim)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.tensorflow.framework.TensorShapeProto.Dim other) { if (other == org.tensorflow.framework.TensorShapeProto.Dim.getDefaultInstance()) return this; if (other.getSize() != 0L) { setSize(other.getSize()); } if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.github.os72.protobuf351.CodedInputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.tensorflow.framework.TensorShapeProto.Dim parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.github.os72.protobuf351.InvalidProtocolBufferException e) { parsedMessage = (org.tensorflow.framework.TensorShapeProto.Dim) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private long size_ ; /** *
       * Size of the tensor in that dimension.
       * This value must be >= -1, but values of -1 are reserved for "unknown"
       * shapes (values of -1 mean "unknown" dimension).  Certain wrappers
       * that work with TensorShapeProto may fail at runtime when deserializing
       * a TensorShapeProto containing a dim value of -1.
       * 
* * int64 size = 1; */ public long getSize() { return size_; } /** *
       * Size of the tensor in that dimension.
       * This value must be >= -1, but values of -1 are reserved for "unknown"
       * shapes (values of -1 mean "unknown" dimension).  Certain wrappers
       * that work with TensorShapeProto may fail at runtime when deserializing
       * a TensorShapeProto containing a dim value of -1.
       * 
* * int64 size = 1; */ public Builder setSize(long value) { size_ = value; onChanged(); return this; } /** *
       * Size of the tensor in that dimension.
       * This value must be >= -1, but values of -1 are reserved for "unknown"
       * shapes (values of -1 mean "unknown" dimension).  Certain wrappers
       * that work with TensorShapeProto may fail at runtime when deserializing
       * a TensorShapeProto containing a dim value of -1.
       * 
* * int64 size = 1; */ public Builder clearSize() { size_ = 0L; onChanged(); return this; } private java.lang.Object name_ = ""; /** *
       * Optional name of the tensor dimension.
       * 
* * string name = 2; */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.github.os72.protobuf351.ByteString bs = (com.github.os72.protobuf351.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Optional name of the tensor dimension.
       * 
* * string name = 2; */ public com.github.os72.protobuf351.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.github.os72.protobuf351.ByteString b = com.github.os72.protobuf351.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.github.os72.protobuf351.ByteString) ref; } } /** *
       * Optional name of the tensor dimension.
       * 
* * string name = 2; */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
       * Optional name of the tensor dimension.
       * 
* * string name = 2; */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
       * Optional name of the tensor dimension.
       * 
* * string name = 2; */ public Builder setNameBytes( com.github.os72.protobuf351.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } public final Builder setUnknownFields( final com.github.os72.protobuf351.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.github.os72.protobuf351.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:tensorflow.TensorShapeProto.Dim) } // @@protoc_insertion_point(class_scope:tensorflow.TensorShapeProto.Dim) private static final org.tensorflow.framework.TensorShapeProto.Dim DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.tensorflow.framework.TensorShapeProto.Dim(); } public static org.tensorflow.framework.TensorShapeProto.Dim getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.github.os72.protobuf351.Parser PARSER = new com.github.os72.protobuf351.AbstractParser() { public Dim parsePartialFrom( com.github.os72.protobuf351.CodedInputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return new Dim(input, extensionRegistry); } }; public static com.github.os72.protobuf351.Parser parser() { return PARSER; } @java.lang.Override public com.github.os72.protobuf351.Parser getParserForType() { return PARSER; } public org.tensorflow.framework.TensorShapeProto.Dim getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int DIM_FIELD_NUMBER = 2; private java.util.List dim_; /** *
   * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
   * for a 30 x 40 2D tensor.  If an entry has size -1, this
   * corresponds to a dimension of unknown size. The names are
   * optional.
   * The order of entries in "dim" matters: It indicates the layout of the
   * values in the tensor in-memory representation.
   * The first entry in "dim" is the outermost dimension used to layout the
   * values, the last entry is the innermost dimension.  This matches the
   * in-memory layout of RowMajor Eigen tensors.
   * If "dim.size()" > 0, "unknown_rank" must be false.
   * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public java.util.List getDimList() { return dim_; } /** *
   * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
   * for a 30 x 40 2D tensor.  If an entry has size -1, this
   * corresponds to a dimension of unknown size. The names are
   * optional.
   * The order of entries in "dim" matters: It indicates the layout of the
   * values in the tensor in-memory representation.
   * The first entry in "dim" is the outermost dimension used to layout the
   * values, the last entry is the innermost dimension.  This matches the
   * in-memory layout of RowMajor Eigen tensors.
   * If "dim.size()" > 0, "unknown_rank" must be false.
   * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public java.util.List getDimOrBuilderList() { return dim_; } /** *
   * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
   * for a 30 x 40 2D tensor.  If an entry has size -1, this
   * corresponds to a dimension of unknown size. The names are
   * optional.
   * The order of entries in "dim" matters: It indicates the layout of the
   * values in the tensor in-memory representation.
   * The first entry in "dim" is the outermost dimension used to layout the
   * values, the last entry is the innermost dimension.  This matches the
   * in-memory layout of RowMajor Eigen tensors.
   * If "dim.size()" > 0, "unknown_rank" must be false.
   * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public int getDimCount() { return dim_.size(); } /** *
   * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
   * for a 30 x 40 2D tensor.  If an entry has size -1, this
   * corresponds to a dimension of unknown size. The names are
   * optional.
   * The order of entries in "dim" matters: It indicates the layout of the
   * values in the tensor in-memory representation.
   * The first entry in "dim" is the outermost dimension used to layout the
   * values, the last entry is the innermost dimension.  This matches the
   * in-memory layout of RowMajor Eigen tensors.
   * If "dim.size()" > 0, "unknown_rank" must be false.
   * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public org.tensorflow.framework.TensorShapeProto.Dim getDim(int index) { return dim_.get(index); } /** *
   * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
   * for a 30 x 40 2D tensor.  If an entry has size -1, this
   * corresponds to a dimension of unknown size. The names are
   * optional.
   * The order of entries in "dim" matters: It indicates the layout of the
   * values in the tensor in-memory representation.
   * The first entry in "dim" is the outermost dimension used to layout the
   * values, the last entry is the innermost dimension.  This matches the
   * in-memory layout of RowMajor Eigen tensors.
   * If "dim.size()" > 0, "unknown_rank" must be false.
   * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public org.tensorflow.framework.TensorShapeProto.DimOrBuilder getDimOrBuilder( int index) { return dim_.get(index); } public static final int UNKNOWN_RANK_FIELD_NUMBER = 3; private boolean unknownRank_; /** *
   * If true, the number of dimensions in the shape is unknown.
   * If true, "dim.size()" must be 0.
   * 
* * bool unknown_rank = 3; */ public boolean getUnknownRank() { return unknownRank_; } 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.github.os72.protobuf351.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < dim_.size(); i++) { output.writeMessage(2, dim_.get(i)); } if (unknownRank_ != false) { output.writeBool(3, unknownRank_); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < dim_.size(); i++) { size += com.github.os72.protobuf351.CodedOutputStream .computeMessageSize(2, dim_.get(i)); } if (unknownRank_ != false) { size += com.github.os72.protobuf351.CodedOutputStream .computeBoolSize(3, unknownRank_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.tensorflow.framework.TensorShapeProto)) { return super.equals(obj); } org.tensorflow.framework.TensorShapeProto other = (org.tensorflow.framework.TensorShapeProto) obj; boolean result = true; result = result && getDimList() .equals(other.getDimList()); result = result && (getUnknownRank() == other.getUnknownRank()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getDimCount() > 0) { hash = (37 * hash) + DIM_FIELD_NUMBER; hash = (53 * hash) + getDimList().hashCode(); } hash = (37 * hash) + UNKNOWN_RANK_FIELD_NUMBER; hash = (53 * hash) + com.github.os72.protobuf351.Internal.hashBoolean( getUnknownRank()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.framework.TensorShapeProto parseFrom( java.nio.ByteBuffer data) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.TensorShapeProto parseFrom( java.nio.ByteBuffer data, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.TensorShapeProto parseFrom( com.github.os72.protobuf351.ByteString data) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.TensorShapeProto parseFrom( com.github.os72.protobuf351.ByteString data, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.TensorShapeProto parseFrom(byte[] data) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.TensorShapeProto parseFrom( byte[] data, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.TensorShapeProto parseFrom(java.io.InputStream input) throws java.io.IOException { return com.github.os72.protobuf351.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.TensorShapeProto parseFrom( java.io.InputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.github.os72.protobuf351.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.TensorShapeProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.github.os72.protobuf351.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.framework.TensorShapeProto parseDelimitedFrom( java.io.InputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.github.os72.protobuf351.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.TensorShapeProto parseFrom( com.github.os72.protobuf351.CodedInputStream input) throws java.io.IOException { return com.github.os72.protobuf351.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.TensorShapeProto parseFrom( com.github.os72.protobuf351.CodedInputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.github.os72.protobuf351.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.TensorShapeProto 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.github.os72.protobuf351.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * Dimensions of a tensor.
   * 
* * Protobuf type {@code tensorflow.TensorShapeProto} */ public static final class Builder extends com.github.os72.protobuf351.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.TensorShapeProto) org.tensorflow.framework.TensorShapeProtoOrBuilder { public static final com.github.os72.protobuf351.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_descriptor; } protected com.github.os72.protobuf351.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.framework.TensorShapeProto.class, org.tensorflow.framework.TensorShapeProto.Builder.class); } // Construct using org.tensorflow.framework.TensorShapeProto.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.github.os72.protobuf351.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.github.os72.protobuf351.GeneratedMessageV3 .alwaysUseFieldBuilders) { getDimFieldBuilder(); } } public Builder clear() { super.clear(); if (dimBuilder_ == null) { dim_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { dimBuilder_.clear(); } unknownRank_ = false; return this; } public com.github.os72.protobuf351.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_descriptor; } public org.tensorflow.framework.TensorShapeProto getDefaultInstanceForType() { return org.tensorflow.framework.TensorShapeProto.getDefaultInstance(); } public org.tensorflow.framework.TensorShapeProto build() { org.tensorflow.framework.TensorShapeProto result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.tensorflow.framework.TensorShapeProto buildPartial() { org.tensorflow.framework.TensorShapeProto result = new org.tensorflow.framework.TensorShapeProto(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (dimBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { dim_ = java.util.Collections.unmodifiableList(dim_); bitField0_ = (bitField0_ & ~0x00000001); } result.dim_ = dim_; } else { result.dim_ = dimBuilder_.build(); } result.unknownRank_ = unknownRank_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.github.os72.protobuf351.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.github.os72.protobuf351.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.github.os72.protobuf351.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.github.os72.protobuf351.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.github.os72.protobuf351.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.github.os72.protobuf351.Message other) { if (other instanceof org.tensorflow.framework.TensorShapeProto) { return mergeFrom((org.tensorflow.framework.TensorShapeProto)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.tensorflow.framework.TensorShapeProto other) { if (other == org.tensorflow.framework.TensorShapeProto.getDefaultInstance()) return this; if (dimBuilder_ == null) { if (!other.dim_.isEmpty()) { if (dim_.isEmpty()) { dim_ = other.dim_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureDimIsMutable(); dim_.addAll(other.dim_); } onChanged(); } } else { if (!other.dim_.isEmpty()) { if (dimBuilder_.isEmpty()) { dimBuilder_.dispose(); dimBuilder_ = null; dim_ = other.dim_; bitField0_ = (bitField0_ & ~0x00000001); dimBuilder_ = com.github.os72.protobuf351.GeneratedMessageV3.alwaysUseFieldBuilders ? getDimFieldBuilder() : null; } else { dimBuilder_.addAllMessages(other.dim_); } } } if (other.getUnknownRank() != false) { setUnknownRank(other.getUnknownRank()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.github.os72.protobuf351.CodedInputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.tensorflow.framework.TensorShapeProto parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.github.os72.protobuf351.InvalidProtocolBufferException e) { parsedMessage = (org.tensorflow.framework.TensorShapeProto) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List dim_ = java.util.Collections.emptyList(); private void ensureDimIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { dim_ = new java.util.ArrayList(dim_); bitField0_ |= 0x00000001; } } private com.github.os72.protobuf351.RepeatedFieldBuilderV3< org.tensorflow.framework.TensorShapeProto.Dim, org.tensorflow.framework.TensorShapeProto.Dim.Builder, org.tensorflow.framework.TensorShapeProto.DimOrBuilder> dimBuilder_; /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public java.util.List getDimList() { if (dimBuilder_ == null) { return java.util.Collections.unmodifiableList(dim_); } else { return dimBuilder_.getMessageList(); } } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public int getDimCount() { if (dimBuilder_ == null) { return dim_.size(); } else { return dimBuilder_.getCount(); } } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public org.tensorflow.framework.TensorShapeProto.Dim getDim(int index) { if (dimBuilder_ == null) { return dim_.get(index); } else { return dimBuilder_.getMessage(index); } } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public Builder setDim( int index, org.tensorflow.framework.TensorShapeProto.Dim value) { if (dimBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureDimIsMutable(); dim_.set(index, value); onChanged(); } else { dimBuilder_.setMessage(index, value); } return this; } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public Builder setDim( int index, org.tensorflow.framework.TensorShapeProto.Dim.Builder builderForValue) { if (dimBuilder_ == null) { ensureDimIsMutable(); dim_.set(index, builderForValue.build()); onChanged(); } else { dimBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public Builder addDim(org.tensorflow.framework.TensorShapeProto.Dim value) { if (dimBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureDimIsMutable(); dim_.add(value); onChanged(); } else { dimBuilder_.addMessage(value); } return this; } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public Builder addDim( int index, org.tensorflow.framework.TensorShapeProto.Dim value) { if (dimBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureDimIsMutable(); dim_.add(index, value); onChanged(); } else { dimBuilder_.addMessage(index, value); } return this; } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public Builder addDim( org.tensorflow.framework.TensorShapeProto.Dim.Builder builderForValue) { if (dimBuilder_ == null) { ensureDimIsMutable(); dim_.add(builderForValue.build()); onChanged(); } else { dimBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public Builder addDim( int index, org.tensorflow.framework.TensorShapeProto.Dim.Builder builderForValue) { if (dimBuilder_ == null) { ensureDimIsMutable(); dim_.add(index, builderForValue.build()); onChanged(); } else { dimBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public Builder addAllDim( java.lang.Iterable values) { if (dimBuilder_ == null) { ensureDimIsMutable(); com.github.os72.protobuf351.AbstractMessageLite.Builder.addAll( values, dim_); onChanged(); } else { dimBuilder_.addAllMessages(values); } return this; } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public Builder clearDim() { if (dimBuilder_ == null) { dim_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { dimBuilder_.clear(); } return this; } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public Builder removeDim(int index) { if (dimBuilder_ == null) { ensureDimIsMutable(); dim_.remove(index); onChanged(); } else { dimBuilder_.remove(index); } return this; } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public org.tensorflow.framework.TensorShapeProto.Dim.Builder getDimBuilder( int index) { return getDimFieldBuilder().getBuilder(index); } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public org.tensorflow.framework.TensorShapeProto.DimOrBuilder getDimOrBuilder( int index) { if (dimBuilder_ == null) { return dim_.get(index); } else { return dimBuilder_.getMessageOrBuilder(index); } } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public java.util.List getDimOrBuilderList() { if (dimBuilder_ != null) { return dimBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(dim_); } } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public org.tensorflow.framework.TensorShapeProto.Dim.Builder addDimBuilder() { return getDimFieldBuilder().addBuilder( org.tensorflow.framework.TensorShapeProto.Dim.getDefaultInstance()); } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public org.tensorflow.framework.TensorShapeProto.Dim.Builder addDimBuilder( int index) { return getDimFieldBuilder().addBuilder( index, org.tensorflow.framework.TensorShapeProto.Dim.getDefaultInstance()); } /** *
     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
     * for a 30 x 40 2D tensor.  If an entry has size -1, this
     * corresponds to a dimension of unknown size. The names are
     * optional.
     * The order of entries in "dim" matters: It indicates the layout of the
     * values in the tensor in-memory representation.
     * The first entry in "dim" is the outermost dimension used to layout the
     * values, the last entry is the innermost dimension.  This matches the
     * in-memory layout of RowMajor Eigen tensors.
     * If "dim.size()" > 0, "unknown_rank" must be false.
     * 
* * repeated .tensorflow.TensorShapeProto.Dim dim = 2; */ public java.util.List getDimBuilderList() { return getDimFieldBuilder().getBuilderList(); } private com.github.os72.protobuf351.RepeatedFieldBuilderV3< org.tensorflow.framework.TensorShapeProto.Dim, org.tensorflow.framework.TensorShapeProto.Dim.Builder, org.tensorflow.framework.TensorShapeProto.DimOrBuilder> getDimFieldBuilder() { if (dimBuilder_ == null) { dimBuilder_ = new com.github.os72.protobuf351.RepeatedFieldBuilderV3< org.tensorflow.framework.TensorShapeProto.Dim, org.tensorflow.framework.TensorShapeProto.Dim.Builder, org.tensorflow.framework.TensorShapeProto.DimOrBuilder>( dim_, ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); dim_ = null; } return dimBuilder_; } private boolean unknownRank_ ; /** *
     * If true, the number of dimensions in the shape is unknown.
     * If true, "dim.size()" must be 0.
     * 
* * bool unknown_rank = 3; */ public boolean getUnknownRank() { return unknownRank_; } /** *
     * If true, the number of dimensions in the shape is unknown.
     * If true, "dim.size()" must be 0.
     * 
* * bool unknown_rank = 3; */ public Builder setUnknownRank(boolean value) { unknownRank_ = value; onChanged(); return this; } /** *
     * If true, the number of dimensions in the shape is unknown.
     * If true, "dim.size()" must be 0.
     * 
* * bool unknown_rank = 3; */ public Builder clearUnknownRank() { unknownRank_ = false; onChanged(); return this; } public final Builder setUnknownFields( final com.github.os72.protobuf351.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.github.os72.protobuf351.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:tensorflow.TensorShapeProto) } // @@protoc_insertion_point(class_scope:tensorflow.TensorShapeProto) private static final org.tensorflow.framework.TensorShapeProto DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.tensorflow.framework.TensorShapeProto(); } public static org.tensorflow.framework.TensorShapeProto getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.github.os72.protobuf351.Parser PARSER = new com.github.os72.protobuf351.AbstractParser() { public TensorShapeProto parsePartialFrom( com.github.os72.protobuf351.CodedInputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return new TensorShapeProto(input, extensionRegistry); } }; public static com.github.os72.protobuf351.Parser parser() { return PARSER; } @java.lang.Override public com.github.os72.protobuf351.Parser getParserForType() { return PARSER; } public org.tensorflow.framework.TensorShapeProto getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy