org.tensorflow.framework.TensorShapeProto Maven / Gradle / Ivy
The 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
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.TensorShapeProto)
TensorShapeProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use TensorShapeProto.newBuilder() to construct.
private TensorShapeProto(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private TensorShapeProto() {
dim_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TensorShapeProto();
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TensorShapeProto(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
org.nd4j.shade.protobuf.UnknownFieldSet.Builder unknownFields =
org.nd4j.shade.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
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;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (org.nd4j.shade.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new org.nd4j.shade.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
dim_ = java.util.Collections.unmodifiableList(dim_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_descriptor;
}
@java.lang.Override
protected org.nd4j.shade.protobuf.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)
org.nd4j.shade.protobuf.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;
* @return The size.
*/
long getSize();
/**
*
* Optional name of the tensor dimension.
*
*
* string name = 2;
* @return The name.
*/
java.lang.String getName();
/**
*
* Optional name of the tensor dimension.
*
*
* string name = 2;
* @return The bytes for name.
*/
org.nd4j.shade.protobuf.ByteString
getNameBytes();
}
/**
*
* One dimension of the tensor.
*
*
* Protobuf type {@code tensorflow.TensorShapeProto.Dim}
*/
public static final class Dim extends
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.TensorShapeProto.Dim)
DimOrBuilder {
private static final long serialVersionUID = 0L;
// Use Dim.newBuilder() to construct.
private Dim(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private Dim() {
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Dim();
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Dim(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
org.nd4j.shade.protobuf.UnknownFieldSet.Builder unknownFields =
org.nd4j.shade.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
size_ = input.readInt64();
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (org.nd4j.shade.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new org.nd4j.shade.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_Dim_descriptor;
}
@java.lang.Override
protected org.nd4j.shade.protobuf.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;
* @return The size.
*/
@java.lang.Override
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;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* Optional name of the tensor dimension.
*
*
* string name = 2;
* @return The bytes for name.
*/
@java.lang.Override
public org.nd4j.shade.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(org.nd4j.shade.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (size_ != 0L) {
output.writeInt64(1, size_);
}
if (!org.nd4j.shade.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (size_ != 0L) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64Size(1, size_);
}
if (!org.nd4j.shade.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += org.nd4j.shade.protobuf.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;
if (getSize()
!= other.getSize()) return false;
if (!getName()
.equals(other.getName())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@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) + org.nd4j.shade.protobuf.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 org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom(
java.nio.ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom(
org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.TensorShapeProto.Dim parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TensorShapeProto.Dim parseDelimitedFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
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);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
org.nd4j.shade.protobuf.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
org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.TensorShapeProto.Dim)
org.tensorflow.framework.TensorShapeProto.DimOrBuilder {
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_Dim_descriptor;
}
@java.lang.Override
protected org.nd4j.shade.protobuf.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(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (org.nd4j.shade.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
size_ = 0L;
name_ = "";
return this;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_Dim_descriptor;
}
@java.lang.Override
public org.tensorflow.framework.TensorShapeProto.Dim getDefaultInstanceForType() {
return org.tensorflow.framework.TensorShapeProto.Dim.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.framework.TensorShapeProto.Dim build() {
org.tensorflow.framework.TensorShapeProto.Dim result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
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;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(org.nd4j.shade.protobuf.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;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.TensorShapeProto.Dim parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.nd4j.shade.protobuf.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;
* @return The size.
*/
@java.lang.Override
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;
* @param value The size to set.
* @return This builder for chaining.
*/
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;
* @return This builder for chaining.
*/
public Builder clearSize() {
size_ = 0L;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
* Optional name of the tensor dimension.
*
*
* string name = 2;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.protobuf.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;
* @return The bytes for name.
*/
public org.nd4j.shade.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
/**
*
* Optional name of the tensor dimension.
*
*
* string name = 2;
* @param value The name to set.
* @return This builder for chaining.
*/
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;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Optional name of the tensor dimension.
*
*
* string name = 2;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final org.nd4j.shade.protobuf.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 org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
@java.lang.Override
public Dim parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new Dim(input, extensionRegistry);
}
};
public static org.nd4j.shade.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.tensorflow.framework.TensorShapeProto.Dim getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
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;
*/
@java.lang.Override
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;
*/
@java.lang.Override
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;
*/
@java.lang.Override
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;
*/
@java.lang.Override
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;
*/
@java.lang.Override
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;
* @return The unknownRank.
*/
@java.lang.Override
public boolean getUnknownRank() {
return unknownRank_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(org.nd4j.shade.protobuf.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);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < dim_.size(); i++) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(2, dim_.get(i));
}
if (unknownRank_ != false) {
size += org.nd4j.shade.protobuf.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;
if (!getDimList()
.equals(other.getDimList())) return false;
if (getUnknownRank()
!= other.getUnknownRank()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@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) + org.nd4j.shade.protobuf.Internal.hashBoolean(
getUnknownRank());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.TensorShapeProto parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TensorShapeProto parseFrom(
java.nio.ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.TensorShapeProto parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TensorShapeProto parseFrom(
org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.TensorShapeProto parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TensorShapeProto parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.TensorShapeProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TensorShapeProto parseFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.TensorShapeProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TensorShapeProto parseDelimitedFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.TensorShapeProto parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TensorShapeProto parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
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);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
org.nd4j.shade.protobuf.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
org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.TensorShapeProto)
org.tensorflow.framework.TensorShapeProtoOrBuilder {
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_descriptor;
}
@java.lang.Override
protected org.nd4j.shade.protobuf.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(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (org.nd4j.shade.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getDimFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (dimBuilder_ == null) {
dim_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
dimBuilder_.clear();
}
unknownRank_ = false;
return this;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_descriptor;
}
@java.lang.Override
public org.tensorflow.framework.TensorShapeProto getDefaultInstanceForType() {
return org.tensorflow.framework.TensorShapeProto.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.framework.TensorShapeProto build() {
org.tensorflow.framework.TensorShapeProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.framework.TensorShapeProto buildPartial() {
org.tensorflow.framework.TensorShapeProto result = new org.tensorflow.framework.TensorShapeProto(this);
int from_bitField0_ = bitField0_;
if (dimBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
dim_ = java.util.Collections.unmodifiableList(dim_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.dim_ = dim_;
} else {
result.dim_ = dimBuilder_.build();
}
result.unknownRank_ = unknownRank_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(org.nd4j.shade.protobuf.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_ =
org.nd4j.shade.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getDimFieldBuilder() : null;
} else {
dimBuilder_.addAllMessages(other.dim_);
}
}
}
if (other.getUnknownRank() != false) {
setUnknownRank(other.getUnknownRank());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.TensorShapeProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.nd4j.shade.protobuf.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) != 0)) {
dim_ = new java.util.ArrayList(dim_);
bitField0_ |= 0x00000001;
}
}
private org.nd4j.shade.protobuf.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();
org.nd4j.shade.protobuf.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 org.nd4j.shade.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto.Dim, org.tensorflow.framework.TensorShapeProto.Dim.Builder, org.tensorflow.framework.TensorShapeProto.DimOrBuilder>
getDimFieldBuilder() {
if (dimBuilder_ == null) {
dimBuilder_ = new org.nd4j.shade.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto.Dim, org.tensorflow.framework.TensorShapeProto.Dim.Builder, org.tensorflow.framework.TensorShapeProto.DimOrBuilder>(
dim_,
((bitField0_ & 0x00000001) != 0),
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;
* @return The unknownRank.
*/
@java.lang.Override
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;
* @param value The unknownRank to set.
* @return This builder for chaining.
*/
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;
* @return This builder for chaining.
*/
public Builder clearUnknownRank() {
unknownRank_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final org.nd4j.shade.protobuf.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 org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
@java.lang.Override
public TensorShapeProto parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new TensorShapeProto(input, extensionRegistry);
}
};
public static org.nd4j.shade.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.tensorflow.framework.TensorShapeProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}