Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/protobuf/meta_graph.proto
package org.tensorflow.framework;
/**
*
* Information about a Tensor necessary for feeding or retrieval.
*
*
* Protobuf type {@code tensorflow.TensorInfo}
*/
public final class TensorInfo extends
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.TensorInfo)
TensorInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use TensorInfo.newBuilder() to construct.
private TensorInfo(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private TensorInfo() {
dtype_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TensorInfo();
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TensorInfo(
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 10: {
java.lang.String s = input.readStringRequireUtf8();
encodingCase_ = 1;
encoding_ = s;
break;
}
case 16: {
int rawValue = input.readEnum();
dtype_ = rawValue;
break;
}
case 26: {
org.tensorflow.framework.TensorShapeProto.Builder subBuilder = null;
if (tensorShape_ != null) {
subBuilder = tensorShape_.toBuilder();
}
tensorShape_ = input.readMessage(org.tensorflow.framework.TensorShapeProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(tensorShape_);
tensorShape_ = subBuilder.buildPartial();
}
break;
}
case 34: {
org.tensorflow.framework.TensorInfo.CooSparse.Builder subBuilder = null;
if (encodingCase_ == 4) {
subBuilder = ((org.tensorflow.framework.TensorInfo.CooSparse) encoding_).toBuilder();
}
encoding_ =
input.readMessage(org.tensorflow.framework.TensorInfo.CooSparse.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.tensorflow.framework.TensorInfo.CooSparse) encoding_);
encoding_ = subBuilder.buildPartial();
}
encodingCase_ = 4;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
throw e.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.MetaGraphProtos.internal_static_tensorflow_TensorInfo_descriptor;
}
@java.lang.Override
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_TensorInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.TensorInfo.class, org.tensorflow.framework.TensorInfo.Builder.class);
}
public interface CooSparseOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.TensorInfo.CooSparse)
org.nd4j.shade.protobuf.MessageOrBuilder {
/**
*
* The shape of the values Tensor is [?]. Its dtype must be the dtype of
* the SparseTensor as a whole, given in the enclosing TensorInfo.
*
* The dynamic logical shape represented by the SparseTensor is recorded in
* the Tensor referenced here. It must have dtype int64 and shape [?].
*
*
* string dense_shape_tensor_name = 3;
* @return The bytes for denseShapeTensorName.
*/
public org.nd4j.shade.protobuf.ByteString
getDenseShapeTensorNameBytes() {
java.lang.Object ref = denseShapeTensorName_;
if (ref instanceof String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
denseShapeTensorName_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
/**
*
* The dynamic logical shape represented by the SparseTensor is recorded in
* the Tensor referenced here. It must have dtype int64 and shape [?].
*
*
* string dense_shape_tensor_name = 3;
* @param value The denseShapeTensorName to set.
* @return This builder for chaining.
*/
public Builder setDenseShapeTensorName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
denseShapeTensorName_ = value;
onChanged();
return this;
}
/**
*
* The dynamic logical shape represented by the SparseTensor is recorded in
* the Tensor referenced here. It must have dtype int64 and shape [?].
*
*
* string dense_shape_tensor_name = 3;
* @return This builder for chaining.
*/
public Builder clearDenseShapeTensorName() {
denseShapeTensorName_ = getDefaultInstance().getDenseShapeTensorName();
onChanged();
return this;
}
/**
*
* The dynamic logical shape represented by the SparseTensor is recorded in
* the Tensor referenced here. It must have dtype int64 and shape [?].
*
*
* string dense_shape_tensor_name = 3;
* @param value The bytes for denseShapeTensorName to set.
* @return This builder for chaining.
*/
public Builder setDenseShapeTensorNameBytes(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
denseShapeTensorName_ = 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.TensorInfo.CooSparse)
}
// @@protoc_insertion_point(class_scope:tensorflow.TensorInfo.CooSparse)
private static final org.tensorflow.framework.TensorInfo.CooSparse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.TensorInfo.CooSparse();
}
public static org.tensorflow.framework.TensorInfo.CooSparse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
@java.lang.Override
public CooSparse parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new CooSparse(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.TensorInfo.CooSparse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int encodingCase_ = 0;
private java.lang.Object encoding_;
public enum EncodingCase
implements org.nd4j.shade.protobuf.Internal.EnumLite,
org.nd4j.shade.protobuf.AbstractMessage.InternalOneOfEnum {
NAME(1),
COO_SPARSE(4),
ENCODING_NOT_SET(0);
private final int value;
private EncodingCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static EncodingCase valueOf(int value) {
return forNumber(value);
}
public static EncodingCase forNumber(int value) {
switch (value) {
case 1: return NAME;
case 4: return COO_SPARSE;
case 0: return ENCODING_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public EncodingCase
getEncodingCase() {
return EncodingCase.forNumber(
encodingCase_);
}
public static final int NAME_FIELD_NUMBER = 1;
/**
*
* For dense `Tensor`s, the name of the tensor in the graph.
*
*
* string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = "";
if (encodingCase_ == 1) {
ref = encoding_;
}
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();
if (encodingCase_ == 1) {
encoding_ = s;
}
return s;
}
}
/**
*
* For dense `Tensor`s, the name of the tensor in the graph.
*
*
* string name = 1;
* @return The bytes for name.
*/
public org.nd4j.shade.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = "";
if (encodingCase_ == 1) {
ref = encoding_;
}
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (encodingCase_ == 1) {
encoding_ = b;
}
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
public static final int COO_SPARSE_FIELD_NUMBER = 4;
/**
*
* There are many possible encodings of sparse matrices
* (https://en.wikipedia.org/wiki/Sparse_matrix). Currently, TensorFlow
* uses only the COO encoding. This is supported and documented in the
* SparseTensor Python class.
*
*
* .tensorflow.TensorInfo.CooSparse coo_sparse = 4;
* @return Whether the cooSparse field is set.
*/
@java.lang.Override
public boolean hasCooSparse() {
return encodingCase_ == 4;
}
/**
*
* There are many possible encodings of sparse matrices
* (https://en.wikipedia.org/wiki/Sparse_matrix). Currently, TensorFlow
* uses only the COO encoding. This is supported and documented in the
* SparseTensor Python class.
*
*
* .tensorflow.TensorInfo.CooSparse coo_sparse = 4;
* @return The cooSparse.
*/
@java.lang.Override
public org.tensorflow.framework.TensorInfo.CooSparse getCooSparse() {
if (encodingCase_ == 4) {
return (org.tensorflow.framework.TensorInfo.CooSparse) encoding_;
}
return org.tensorflow.framework.TensorInfo.CooSparse.getDefaultInstance();
}
/**
*
* There are many possible encodings of sparse matrices
* (https://en.wikipedia.org/wiki/Sparse_matrix). Currently, TensorFlow
* uses only the COO encoding. This is supported and documented in the
* SparseTensor Python class.
*
*
* .tensorflow.TensorInfo.CooSparse coo_sparse = 4;
*/
@java.lang.Override
public org.tensorflow.framework.TensorInfo.CooSparseOrBuilder getCooSparseOrBuilder() {
if (encodingCase_ == 4) {
return (org.tensorflow.framework.TensorInfo.CooSparse) encoding_;
}
return org.tensorflow.framework.TensorInfo.CooSparse.getDefaultInstance();
}
public static final int DTYPE_FIELD_NUMBER = 2;
private int dtype_;
/**
* .tensorflow.DataType dtype = 2;
* @return The enum numeric value on the wire for dtype.
*/
@java.lang.Override public int getDtypeValue() {
return dtype_;
}
/**
* .tensorflow.DataType dtype = 2;
* @return The dtype.
*/
@java.lang.Override public org.tensorflow.framework.DataType getDtype() {
@SuppressWarnings("deprecation")
org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(dtype_);
return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result;
}
public static final int TENSOR_SHAPE_FIELD_NUMBER = 3;
private org.tensorflow.framework.TensorShapeProto tensorShape_;
/**
*
* The static shape should be recorded here, to the extent that it can
* be known in advance. In the case of a SparseTensor, this field describes
* the logical shape of the represented tensor (aka dense_shape).
*
*
* .tensorflow.TensorShapeProto tensor_shape = 3;
* @return Whether the tensorShape field is set.
*/
@java.lang.Override
public boolean hasTensorShape() {
return tensorShape_ != null;
}
/**
*
* The static shape should be recorded here, to the extent that it can
* be known in advance. In the case of a SparseTensor, this field describes
* the logical shape of the represented tensor (aka dense_shape).
*
* The static shape should be recorded here, to the extent that it can
* be known in advance. In the case of a SparseTensor, this field describes
* the logical shape of the represented tensor (aka dense_shape).
*
*
* .tensorflow.TensorShapeProto tensor_shape = 3;
*/
@java.lang.Override
public org.tensorflow.framework.TensorShapeProtoOrBuilder getTensorShapeOrBuilder() {
return getTensorShape();
}
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 (encodingCase_ == 1) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 1, encoding_);
}
if (dtype_ != org.tensorflow.framework.DataType.DT_INVALID.getNumber()) {
output.writeEnum(2, dtype_);
}
if (tensorShape_ != null) {
output.writeMessage(3, getTensorShape());
}
if (encodingCase_ == 4) {
output.writeMessage(4, (org.tensorflow.framework.TensorInfo.CooSparse) encoding_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (encodingCase_ == 1) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(1, encoding_);
}
if (dtype_ != org.tensorflow.framework.DataType.DT_INVALID.getNumber()) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeEnumSize(2, dtype_);
}
if (tensorShape_ != null) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(3, getTensorShape());
}
if (encodingCase_ == 4) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(4, (org.tensorflow.framework.TensorInfo.CooSparse) encoding_);
}
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.TensorInfo)) {
return super.equals(obj);
}
org.tensorflow.framework.TensorInfo other = (org.tensorflow.framework.TensorInfo) obj;
if (dtype_ != other.dtype_) return false;
if (hasTensorShape() != other.hasTensorShape()) return false;
if (hasTensorShape()) {
if (!getTensorShape()
.equals(other.getTensorShape())) return false;
}
if (!getEncodingCase().equals(other.getEncodingCase())) return false;
switch (encodingCase_) {
case 1:
if (!getName()
.equals(other.getName())) return false;
break;
case 4:
if (!getCooSparse()
.equals(other.getCooSparse())) return false;
break;
case 0:
default:
}
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) + DTYPE_FIELD_NUMBER;
hash = (53 * hash) + dtype_;
if (hasTensorShape()) {
hash = (37 * hash) + TENSOR_SHAPE_FIELD_NUMBER;
hash = (53 * hash) + getTensorShape().hashCode();
}
switch (encodingCase_) {
case 1:
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
break;
case 4:
hash = (37 * hash) + COO_SPARSE_FIELD_NUMBER;
hash = (53 * hash) + getCooSparse().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.TensorInfo parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TensorInfo 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.TensorInfo parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TensorInfo 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.TensorInfo parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TensorInfo 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.TensorInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TensorInfo 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.TensorInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TensorInfo 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.TensorInfo 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.TensorInfo 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.TensorInfo 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;
}
/**
*
* Information about a Tensor necessary for feeding or retrieval.
*
*
* Protobuf type {@code tensorflow.TensorInfo}
*/
public static final class Builder extends
org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.TensorInfo)
org.tensorflow.framework.TensorInfoOrBuilder {
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_TensorInfo_descriptor;
}
@java.lang.Override
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_TensorInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.TensorInfo.class, org.tensorflow.framework.TensorInfo.Builder.class);
}
// Construct using org.tensorflow.framework.TensorInfo.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();
dtype_ = 0;
if (tensorShapeBuilder_ == null) {
tensorShape_ = null;
} else {
tensorShape_ = null;
tensorShapeBuilder_ = null;
}
encodingCase_ = 0;
encoding_ = null;
return this;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_TensorInfo_descriptor;
}
@java.lang.Override
public org.tensorflow.framework.TensorInfo getDefaultInstanceForType() {
return org.tensorflow.framework.TensorInfo.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.framework.TensorInfo build() {
org.tensorflow.framework.TensorInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.framework.TensorInfo buildPartial() {
org.tensorflow.framework.TensorInfo result = new org.tensorflow.framework.TensorInfo(this);
if (encodingCase_ == 1) {
result.encoding_ = encoding_;
}
if (encodingCase_ == 4) {
if (cooSparseBuilder_ == null) {
result.encoding_ = encoding_;
} else {
result.encoding_ = cooSparseBuilder_.build();
}
}
result.dtype_ = dtype_;
if (tensorShapeBuilder_ == null) {
result.tensorShape_ = tensorShape_;
} else {
result.tensorShape_ = tensorShapeBuilder_.build();
}
result.encodingCase_ = encodingCase_;
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.TensorInfo) {
return mergeFrom((org.tensorflow.framework.TensorInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.TensorInfo other) {
if (other == org.tensorflow.framework.TensorInfo.getDefaultInstance()) return this;
if (other.dtype_ != 0) {
setDtypeValue(other.getDtypeValue());
}
if (other.hasTensorShape()) {
mergeTensorShape(other.getTensorShape());
}
switch (other.getEncodingCase()) {
case NAME: {
encodingCase_ = 1;
encoding_ = other.encoding_;
onChanged();
break;
}
case COO_SPARSE: {
mergeCooSparse(other.getCooSparse());
break;
}
case ENCODING_NOT_SET: {
break;
}
}
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.TensorInfo parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.TensorInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int encodingCase_ = 0;
private java.lang.Object encoding_;
public EncodingCase
getEncodingCase() {
return EncodingCase.forNumber(
encodingCase_);
}
public Builder clearEncoding() {
encodingCase_ = 0;
encoding_ = null;
onChanged();
return this;
}
/**
*
* For dense `Tensor`s, the name of the tensor in the graph.
*
*
* string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = "";
if (encodingCase_ == 1) {
ref = encoding_;
}
if (!(ref instanceof java.lang.String)) {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (encodingCase_ == 1) {
encoding_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* For dense `Tensor`s, the name of the tensor in the graph.
*
*
* string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public org.nd4j.shade.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = "";
if (encodingCase_ == 1) {
ref = encoding_;
}
if (ref instanceof String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (encodingCase_ == 1) {
encoding_ = b;
}
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
/**
*
* For dense `Tensor`s, the name of the tensor in the graph.
*
*
* string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
encodingCase_ = 1;
encoding_ = value;
onChanged();
return this;
}
/**
*
* For dense `Tensor`s, the name of the tensor in the graph.
*
*
* string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
if (encodingCase_ == 1) {
encodingCase_ = 0;
encoding_ = null;
onChanged();
}
return this;
}
/**
*
* For dense `Tensor`s, the name of the tensor in the graph.
*
*
* string name = 1;
* @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);
encodingCase_ = 1;
encoding_ = value;
onChanged();
return this;
}
private org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorInfo.CooSparse, org.tensorflow.framework.TensorInfo.CooSparse.Builder, org.tensorflow.framework.TensorInfo.CooSparseOrBuilder> cooSparseBuilder_;
/**
*
* There are many possible encodings of sparse matrices
* (https://en.wikipedia.org/wiki/Sparse_matrix). Currently, TensorFlow
* uses only the COO encoding. This is supported and documented in the
* SparseTensor Python class.
*
*
* .tensorflow.TensorInfo.CooSparse coo_sparse = 4;
* @return Whether the cooSparse field is set.
*/
@java.lang.Override
public boolean hasCooSparse() {
return encodingCase_ == 4;
}
/**
*
* There are many possible encodings of sparse matrices
* (https://en.wikipedia.org/wiki/Sparse_matrix). Currently, TensorFlow
* uses only the COO encoding. This is supported and documented in the
* SparseTensor Python class.
*
*
* .tensorflow.TensorInfo.CooSparse coo_sparse = 4;
* @return The cooSparse.
*/
@java.lang.Override
public org.tensorflow.framework.TensorInfo.CooSparse getCooSparse() {
if (cooSparseBuilder_ == null) {
if (encodingCase_ == 4) {
return (org.tensorflow.framework.TensorInfo.CooSparse) encoding_;
}
return org.tensorflow.framework.TensorInfo.CooSparse.getDefaultInstance();
} else {
if (encodingCase_ == 4) {
return cooSparseBuilder_.getMessage();
}
return org.tensorflow.framework.TensorInfo.CooSparse.getDefaultInstance();
}
}
/**
*
* There are many possible encodings of sparse matrices
* (https://en.wikipedia.org/wiki/Sparse_matrix). Currently, TensorFlow
* uses only the COO encoding. This is supported and documented in the
* SparseTensor Python class.
*
* There are many possible encodings of sparse matrices
* (https://en.wikipedia.org/wiki/Sparse_matrix). Currently, TensorFlow
* uses only the COO encoding. This is supported and documented in the
* SparseTensor Python class.
*
* There are many possible encodings of sparse matrices
* (https://en.wikipedia.org/wiki/Sparse_matrix). Currently, TensorFlow
* uses only the COO encoding. This is supported and documented in the
* SparseTensor Python class.
*
* There are many possible encodings of sparse matrices
* (https://en.wikipedia.org/wiki/Sparse_matrix). Currently, TensorFlow
* uses only the COO encoding. This is supported and documented in the
* SparseTensor Python class.
*
* There are many possible encodings of sparse matrices
* (https://en.wikipedia.org/wiki/Sparse_matrix). Currently, TensorFlow
* uses only the COO encoding. This is supported and documented in the
* SparseTensor Python class.
*
* There are many possible encodings of sparse matrices
* (https://en.wikipedia.org/wiki/Sparse_matrix). Currently, TensorFlow
* uses only the COO encoding. This is supported and documented in the
* SparseTensor Python class.
*
* There are many possible encodings of sparse matrices
* (https://en.wikipedia.org/wiki/Sparse_matrix). Currently, TensorFlow
* uses only the COO encoding. This is supported and documented in the
* SparseTensor Python class.
*
*
* .tensorflow.TensorInfo.CooSparse coo_sparse = 4;
*/
private org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorInfo.CooSparse, org.tensorflow.framework.TensorInfo.CooSparse.Builder, org.tensorflow.framework.TensorInfo.CooSparseOrBuilder>
getCooSparseFieldBuilder() {
if (cooSparseBuilder_ == null) {
if (!(encodingCase_ == 4)) {
encoding_ = org.tensorflow.framework.TensorInfo.CooSparse.getDefaultInstance();
}
cooSparseBuilder_ = new org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorInfo.CooSparse, org.tensorflow.framework.TensorInfo.CooSparse.Builder, org.tensorflow.framework.TensorInfo.CooSparseOrBuilder>(
(org.tensorflow.framework.TensorInfo.CooSparse) encoding_,
getParentForChildren(),
isClean());
encoding_ = null;
}
encodingCase_ = 4;
onChanged();;
return cooSparseBuilder_;
}
private int dtype_ = 0;
/**
* .tensorflow.DataType dtype = 2;
* @return The enum numeric value on the wire for dtype.
*/
@java.lang.Override public int getDtypeValue() {
return dtype_;
}
/**
* .tensorflow.DataType dtype = 2;
* @param value The enum numeric value on the wire for dtype to set.
* @return This builder for chaining.
*/
public Builder setDtypeValue(int value) {
dtype_ = value;
onChanged();
return this;
}
/**
* .tensorflow.DataType dtype = 2;
* @return The dtype.
*/
@java.lang.Override
public org.tensorflow.framework.DataType getDtype() {
@SuppressWarnings("deprecation")
org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(dtype_);
return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result;
}
/**
* .tensorflow.DataType dtype = 2;
* @param value The dtype to set.
* @return This builder for chaining.
*/
public Builder setDtype(org.tensorflow.framework.DataType value) {
if (value == null) {
throw new NullPointerException();
}
dtype_ = value.getNumber();
onChanged();
return this;
}
/**
* .tensorflow.DataType dtype = 2;
* @return This builder for chaining.
*/
public Builder clearDtype() {
dtype_ = 0;
onChanged();
return this;
}
private org.tensorflow.framework.TensorShapeProto tensorShape_;
private org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> tensorShapeBuilder_;
/**
*
* The static shape should be recorded here, to the extent that it can
* be known in advance. In the case of a SparseTensor, this field describes
* the logical shape of the represented tensor (aka dense_shape).
*
*
* .tensorflow.TensorShapeProto tensor_shape = 3;
* @return Whether the tensorShape field is set.
*/
public boolean hasTensorShape() {
return tensorShapeBuilder_ != null || tensorShape_ != null;
}
/**
*
* The static shape should be recorded here, to the extent that it can
* be known in advance. In the case of a SparseTensor, this field describes
* the logical shape of the represented tensor (aka dense_shape).
*
* The static shape should be recorded here, to the extent that it can
* be known in advance. In the case of a SparseTensor, this field describes
* the logical shape of the represented tensor (aka dense_shape).
*
*
* .tensorflow.TensorShapeProto tensor_shape = 3;
*/
public Builder setTensorShape(org.tensorflow.framework.TensorShapeProto value) {
if (tensorShapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tensorShape_ = value;
onChanged();
} else {
tensorShapeBuilder_.setMessage(value);
}
return this;
}
/**
*
* The static shape should be recorded here, to the extent that it can
* be known in advance. In the case of a SparseTensor, this field describes
* the logical shape of the represented tensor (aka dense_shape).
*
* The static shape should be recorded here, to the extent that it can
* be known in advance. In the case of a SparseTensor, this field describes
* the logical shape of the represented tensor (aka dense_shape).
*
* The static shape should be recorded here, to the extent that it can
* be known in advance. In the case of a SparseTensor, this field describes
* the logical shape of the represented tensor (aka dense_shape).
*
* The static shape should be recorded here, to the extent that it can
* be known in advance. In the case of a SparseTensor, this field describes
* the logical shape of the represented tensor (aka dense_shape).
*
* The static shape should be recorded here, to the extent that it can
* be known in advance. In the case of a SparseTensor, this field describes
* the logical shape of the represented tensor (aka dense_shape).
*
* The static shape should be recorded here, to the extent that it can
* be known in advance. In the case of a SparseTensor, this field describes
* the logical shape of the represented tensor (aka dense_shape).
*
*
* .tensorflow.TensorShapeProto tensor_shape = 3;
*/
private org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>
getTensorShapeFieldBuilder() {
if (tensorShapeBuilder_ == null) {
tensorShapeBuilder_ = new org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>(
getTensorShape(),
getParentForChildren(),
isClean());
tensorShape_ = null;
}
return tensorShapeBuilder_;
}
@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.TensorInfo)
}
// @@protoc_insertion_point(class_scope:tensorflow.TensorInfo)
private static final org.tensorflow.framework.TensorInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.TensorInfo();
}
public static org.tensorflow.framework.TensorInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
@java.lang.Override
public TensorInfo parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new TensorInfo(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.TensorInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}