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

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

// 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 com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.TensorInfo) TensorInfoOrBuilder { // Use TensorInfo.newBuilder() to construct. private TensorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private TensorInfo() { dtype_ = 0; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private TensorInfo( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 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; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_TensorInfo_descriptor; } protected com.google.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) com.google.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.
     * 
* * string values_tensor_name = 1; */ java.lang.String getValuesTensorName(); /** *
     * The shape of the values Tensor is [?].  Its dtype must be the dtype of
     * the SparseTensor as a whole, given in the enclosing TensorInfo.
     * 
* * string values_tensor_name = 1; */ com.google.protobuf.ByteString getValuesTensorNameBytes(); /** *
     * The indices Tensor must have dtype int64 and shape [?, ?].
     * 
* * string indices_tensor_name = 2; */ java.lang.String getIndicesTensorName(); /** *
     * The indices Tensor must have dtype int64 and shape [?, ?].
     * 
* * string indices_tensor_name = 2; */ com.google.protobuf.ByteString getIndicesTensorNameBytes(); /** *
     * 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; */ java.lang.String getDenseShapeTensorName(); /** *
     * 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; */ com.google.protobuf.ByteString getDenseShapeTensorNameBytes(); } /** *
   * For sparse tensors, The COO encoding stores a triple of values, indices,
   * and shape.
   * 
* * Protobuf type {@code tensorflow.TensorInfo.CooSparse} */ public static final class CooSparse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.TensorInfo.CooSparse) CooSparseOrBuilder { // Use CooSparse.newBuilder() to construct. private CooSparse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private CooSparse() { valuesTensorName_ = ""; indicesTensorName_ = ""; denseShapeTensorName_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private CooSparse( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); valuesTensorName_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); indicesTensorName_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); denseShapeTensorName_ = s; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_TensorInfo_CooSparse_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_TensorInfo_CooSparse_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.framework.TensorInfo.CooSparse.class, org.tensorflow.framework.TensorInfo.CooSparse.Builder.class); } public static final int VALUES_TENSOR_NAME_FIELD_NUMBER = 1; private volatile java.lang.Object valuesTensorName_; /** *
     * The shape of the values Tensor is [?].  Its dtype must be the dtype of
     * the SparseTensor as a whole, given in the enclosing TensorInfo.
     * 
* * string values_tensor_name = 1; */ public java.lang.String getValuesTensorName() { java.lang.Object ref = valuesTensorName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); valuesTensorName_ = s; return s; } } /** *
     * The shape of the values Tensor is [?].  Its dtype must be the dtype of
     * the SparseTensor as a whole, given in the enclosing TensorInfo.
     * 
* * string values_tensor_name = 1; */ public com.google.protobuf.ByteString getValuesTensorNameBytes() { java.lang.Object ref = valuesTensorName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); valuesTensorName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int INDICES_TENSOR_NAME_FIELD_NUMBER = 2; private volatile java.lang.Object indicesTensorName_; /** *
     * The indices Tensor must have dtype int64 and shape [?, ?].
     * 
* * string indices_tensor_name = 2; */ public java.lang.String getIndicesTensorName() { java.lang.Object ref = indicesTensorName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); indicesTensorName_ = s; return s; } } /** *
     * The indices Tensor must have dtype int64 and shape [?, ?].
     * 
* * string indices_tensor_name = 2; */ public com.google.protobuf.ByteString getIndicesTensorNameBytes() { java.lang.Object ref = indicesTensorName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); indicesTensorName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DENSE_SHAPE_TENSOR_NAME_FIELD_NUMBER = 3; private volatile java.lang.Object denseShapeTensorName_; /** *
     * 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; */ public java.lang.String getDenseShapeTensorName() { java.lang.Object ref = denseShapeTensorName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); denseShapeTensorName_ = s; return s; } } /** *
     * 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; */ public com.google.protobuf.ByteString getDenseShapeTensorNameBytes() { java.lang.Object ref = denseShapeTensorName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); denseShapeTensorName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getValuesTensorNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, valuesTensorName_); } if (!getIndicesTensorNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, indicesTensorName_); } if (!getDenseShapeTensorNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, denseShapeTensorName_); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getValuesTensorNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, valuesTensorName_); } if (!getIndicesTensorNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, indicesTensorName_); } if (!getDenseShapeTensorNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, denseShapeTensorName_); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.tensorflow.framework.TensorInfo.CooSparse)) { return super.equals(obj); } org.tensorflow.framework.TensorInfo.CooSparse other = (org.tensorflow.framework.TensorInfo.CooSparse) obj; boolean result = true; result = result && getValuesTensorName() .equals(other.getValuesTensorName()); result = result && getIndicesTensorName() .equals(other.getIndicesTensorName()); result = result && getDenseShapeTensorName() .equals(other.getDenseShapeTensorName()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + VALUES_TENSOR_NAME_FIELD_NUMBER; hash = (53 * hash) + getValuesTensorName().hashCode(); hash = (37 * hash) + INDICES_TENSOR_NAME_FIELD_NUMBER; hash = (53 * hash) + getIndicesTensorName().hashCode(); hash = (37 * hash) + DENSE_SHAPE_TENSOR_NAME_FIELD_NUMBER; hash = (53 * hash) + getDenseShapeTensorName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.framework.TensorInfo.CooSparse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.TensorInfo.CooSparse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.TensorInfo.CooSparse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.TensorInfo.CooSparse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.TensorInfo.CooSparse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.TensorInfo.CooSparse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.TensorInfo.CooSparse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.TensorInfo.CooSparse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.TensorInfo.CooSparse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.framework.TensorInfo.CooSparse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.TensorInfo.CooSparse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.TensorInfo.CooSparse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.tensorflow.framework.TensorInfo.CooSparse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * For sparse tensors, The COO encoding stores a triple of values, indices,
     * and shape.
     * 
* * Protobuf type {@code tensorflow.TensorInfo.CooSparse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.TensorInfo.CooSparse) org.tensorflow.framework.TensorInfo.CooSparseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_TensorInfo_CooSparse_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_TensorInfo_CooSparse_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.framework.TensorInfo.CooSparse.class, org.tensorflow.framework.TensorInfo.CooSparse.Builder.class); } // Construct using org.tensorflow.framework.TensorInfo.CooSparse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); valuesTensorName_ = ""; indicesTensorName_ = ""; denseShapeTensorName_ = ""; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_TensorInfo_CooSparse_descriptor; } public org.tensorflow.framework.TensorInfo.CooSparse getDefaultInstanceForType() { return org.tensorflow.framework.TensorInfo.CooSparse.getDefaultInstance(); } public org.tensorflow.framework.TensorInfo.CooSparse build() { org.tensorflow.framework.TensorInfo.CooSparse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.tensorflow.framework.TensorInfo.CooSparse buildPartial() { org.tensorflow.framework.TensorInfo.CooSparse result = new org.tensorflow.framework.TensorInfo.CooSparse(this); result.valuesTensorName_ = valuesTensorName_; result.indicesTensorName_ = indicesTensorName_; result.denseShapeTensorName_ = denseShapeTensorName_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.framework.TensorInfo.CooSparse) { return mergeFrom((org.tensorflow.framework.TensorInfo.CooSparse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.tensorflow.framework.TensorInfo.CooSparse other) { if (other == org.tensorflow.framework.TensorInfo.CooSparse.getDefaultInstance()) return this; if (!other.getValuesTensorName().isEmpty()) { valuesTensorName_ = other.valuesTensorName_; onChanged(); } if (!other.getIndicesTensorName().isEmpty()) { indicesTensorName_ = other.indicesTensorName_; onChanged(); } if (!other.getDenseShapeTensorName().isEmpty()) { denseShapeTensorName_ = other.denseShapeTensorName_; onChanged(); } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.tensorflow.framework.TensorInfo.CooSparse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.tensorflow.framework.TensorInfo.CooSparse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object valuesTensorName_ = ""; /** *
       * The shape of the values Tensor is [?].  Its dtype must be the dtype of
       * the SparseTensor as a whole, given in the enclosing TensorInfo.
       * 
* * string values_tensor_name = 1; */ public java.lang.String getValuesTensorName() { java.lang.Object ref = valuesTensorName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); valuesTensorName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The shape of the values Tensor is [?].  Its dtype must be the dtype of
       * the SparseTensor as a whole, given in the enclosing TensorInfo.
       * 
* * string values_tensor_name = 1; */ public com.google.protobuf.ByteString getValuesTensorNameBytes() { java.lang.Object ref = valuesTensorName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); valuesTensorName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The shape of the values Tensor is [?].  Its dtype must be the dtype of
       * the SparseTensor as a whole, given in the enclosing TensorInfo.
       * 
* * string values_tensor_name = 1; */ public Builder setValuesTensorName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } valuesTensorName_ = value; onChanged(); return this; } /** *
       * The shape of the values Tensor is [?].  Its dtype must be the dtype of
       * the SparseTensor as a whole, given in the enclosing TensorInfo.
       * 
* * string values_tensor_name = 1; */ public Builder clearValuesTensorName() { valuesTensorName_ = getDefaultInstance().getValuesTensorName(); onChanged(); return this; } /** *
       * The shape of the values Tensor is [?].  Its dtype must be the dtype of
       * the SparseTensor as a whole, given in the enclosing TensorInfo.
       * 
* * string values_tensor_name = 1; */ public Builder setValuesTensorNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); valuesTensorName_ = value; onChanged(); return this; } private java.lang.Object indicesTensorName_ = ""; /** *
       * The indices Tensor must have dtype int64 and shape [?, ?].
       * 
* * string indices_tensor_name = 2; */ public java.lang.String getIndicesTensorName() { java.lang.Object ref = indicesTensorName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); indicesTensorName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The indices Tensor must have dtype int64 and shape [?, ?].
       * 
* * string indices_tensor_name = 2; */ public com.google.protobuf.ByteString getIndicesTensorNameBytes() { java.lang.Object ref = indicesTensorName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); indicesTensorName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The indices Tensor must have dtype int64 and shape [?, ?].
       * 
* * string indices_tensor_name = 2; */ public Builder setIndicesTensorName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } indicesTensorName_ = value; onChanged(); return this; } /** *
       * The indices Tensor must have dtype int64 and shape [?, ?].
       * 
* * string indices_tensor_name = 2; */ public Builder clearIndicesTensorName() { indicesTensorName_ = getDefaultInstance().getIndicesTensorName(); onChanged(); return this; } /** *
       * The indices Tensor must have dtype int64 and shape [?, ?].
       * 
* * string indices_tensor_name = 2; */ public Builder setIndicesTensorNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); indicesTensorName_ = value; onChanged(); return this; } private java.lang.Object denseShapeTensorName_ = ""; /** *
       * 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; */ public java.lang.String getDenseShapeTensorName() { java.lang.Object ref = denseShapeTensorName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); denseShapeTensorName_ = s; return s; } else { return (java.lang.String) 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; */ public com.google.protobuf.ByteString getDenseShapeTensorNameBytes() { java.lang.Object ref = denseShapeTensorName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); denseShapeTensorName_ = b; return b; } else { return (com.google.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; */ 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; */ 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; */ public Builder setDenseShapeTensorNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); denseShapeTensorName_ = value; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:tensorflow.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 com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public CooSparse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new CooSparse(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public org.tensorflow.framework.TensorInfo.CooSparse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int encodingCase_ = 0; private java.lang.Object encoding_; public enum EncodingCase implements com.google.protobuf.Internal.EnumLite { NAME(1), COO_SPARSE(4), ENCODING_NOT_SET(0); private final int value; private EncodingCase(int value) { this.value = value; } /** * @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; */ 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 { com.google.protobuf.ByteString bs = (com.google.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; */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = ""; if (encodingCase_ == 1) { ref = encoding_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (encodingCase_ == 1) { encoding_ = b; } return b; } else { return (com.google.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; */ 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; */ 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; */ public int getDtypeValue() { return dtype_; } /** * .tensorflow.DataType dtype = 2; */ public org.tensorflow.framework.DataType getDtype() { org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(dtype_); return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result; } public static final int TENSOR_SHAPE_FIELD_NUMBER = 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; */ 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).
   * 
* * .tensorflow.TensorShapeProto tensor_shape = 3; */ public org.tensorflow.framework.TensorShapeProto getTensorShape() { return tensorShape_ == null ? org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : 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; */ public org.tensorflow.framework.TensorShapeProtoOrBuilder getTensorShapeOrBuilder() { return getTensorShape(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (encodingCase_ == 1) { com.google.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_); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (encodingCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, encoding_); } if (dtype_ != org.tensorflow.framework.DataType.DT_INVALID.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, dtype_); } if (tensorShape_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getTensorShape()); } if (encodingCase_ == 4) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, (org.tensorflow.framework.TensorInfo.CooSparse) encoding_); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.tensorflow.framework.TensorInfo)) { return super.equals(obj); } org.tensorflow.framework.TensorInfo other = (org.tensorflow.framework.TensorInfo) obj; boolean result = true; result = result && dtype_ == other.dtype_; result = result && (hasTensorShape() == other.hasTensorShape()); if (hasTensorShape()) { result = result && getTensorShape() .equals(other.getTensorShape()); } result = result && getEncodingCase().equals( other.getEncodingCase()); if (!result) return false; switch (encodingCase_) { case 1: result = result && getName() .equals(other.getName()); break; case 4: result = result && getCooSparse() .equals(other.getCooSparse()); break; case 0: default: } return result; } @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 com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.TensorInfo parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.TensorInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.TensorInfo parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.TensorInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.TensorInfo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.TensorInfo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.TensorInfo parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.TensorInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.framework.TensorInfo parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.TensorInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.TensorInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.tensorflow.framework.TensorInfo prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * Information about a Tensor necessary for feeding or retrieval.
   * 
* * Protobuf type {@code tensorflow.TensorInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.TensorInfo) org.tensorflow.framework.TensorInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_TensorInfo_descriptor; } protected com.google.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( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); dtype_ = 0; if (tensorShapeBuilder_ == null) { tensorShape_ = null; } else { tensorShape_ = null; tensorShapeBuilder_ = null; } encodingCase_ = 0; encoding_ = null; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.framework.MetaGraphProtos.internal_static_tensorflow_TensorInfo_descriptor; } public org.tensorflow.framework.TensorInfo getDefaultInstanceForType() { return org.tensorflow.framework.TensorInfo.getDefaultInstance(); } public org.tensorflow.framework.TensorInfo build() { org.tensorflow.framework.TensorInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } 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; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.framework.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; } } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.tensorflow.framework.TensorInfo parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.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; */ public java.lang.String getName() { java.lang.Object ref = ""; if (encodingCase_ == 1) { ref = encoding_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.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; */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = ""; if (encodingCase_ == 1) { ref = encoding_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (encodingCase_ == 1) { encoding_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * For dense `Tensor`s, the name of the tensor in the graph.
     * 
* * string name = 1; */ 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; */ 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; */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); encodingCase_ = 1; encoding_ = value; onChanged(); return this; } private com.google.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; */ 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.
     * 
* * .tensorflow.TensorInfo.CooSparse coo_sparse = 4; */ public Builder setCooSparse(org.tensorflow.framework.TensorInfo.CooSparse value) { if (cooSparseBuilder_ == null) { if (value == null) { throw new NullPointerException(); } encoding_ = value; onChanged(); } else { cooSparseBuilder_.setMessage(value); } encodingCase_ = 4; return this; } /** *
     * 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; */ public Builder setCooSparse( org.tensorflow.framework.TensorInfo.CooSparse.Builder builderForValue) { if (cooSparseBuilder_ == null) { encoding_ = builderForValue.build(); onChanged(); } else { cooSparseBuilder_.setMessage(builderForValue.build()); } encodingCase_ = 4; return this; } /** *
     * 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; */ public Builder mergeCooSparse(org.tensorflow.framework.TensorInfo.CooSparse value) { if (cooSparseBuilder_ == null) { if (encodingCase_ == 4 && encoding_ != org.tensorflow.framework.TensorInfo.CooSparse.getDefaultInstance()) { encoding_ = org.tensorflow.framework.TensorInfo.CooSparse.newBuilder((org.tensorflow.framework.TensorInfo.CooSparse) encoding_) .mergeFrom(value).buildPartial(); } else { encoding_ = value; } onChanged(); } else { if (encodingCase_ == 4) { cooSparseBuilder_.mergeFrom(value); } cooSparseBuilder_.setMessage(value); } encodingCase_ = 4; return this; } /** *
     * 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; */ public Builder clearCooSparse() { if (cooSparseBuilder_ == null) { if (encodingCase_ == 4) { encodingCase_ = 0; encoding_ = null; onChanged(); } } else { if (encodingCase_ == 4) { encodingCase_ = 0; encoding_ = null; } cooSparseBuilder_.clear(); } return this; } /** *
     * 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; */ public org.tensorflow.framework.TensorInfo.CooSparse.Builder getCooSparseBuilder() { return getCooSparseFieldBuilder().getBuilder(); } /** *
     * 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; */ public org.tensorflow.framework.TensorInfo.CooSparseOrBuilder getCooSparseOrBuilder() { if ((encodingCase_ == 4) && (cooSparseBuilder_ != null)) { return cooSparseBuilder_.getMessageOrBuilder(); } else { 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; */ private com.google.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 com.google.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; */ public int getDtypeValue() { return dtype_; } /** * .tensorflow.DataType dtype = 2; */ public Builder setDtypeValue(int value) { dtype_ = value; onChanged(); return this; } /** * .tensorflow.DataType dtype = 2; */ public org.tensorflow.framework.DataType getDtype() { org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(dtype_); return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result; } /** * .tensorflow.DataType dtype = 2; */ public Builder setDtype(org.tensorflow.framework.DataType value) { if (value == null) { throw new NullPointerException(); } dtype_ = value.getNumber(); onChanged(); return this; } /** * .tensorflow.DataType dtype = 2; */ public Builder clearDtype() { dtype_ = 0; onChanged(); return this; } private org.tensorflow.framework.TensorShapeProto tensorShape_ = null; private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> tensorShapeBuilder_; /** *
     * 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 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).
     * 
* * .tensorflow.TensorShapeProto tensor_shape = 3; */ public org.tensorflow.framework.TensorShapeProto getTensorShape() { if (tensorShapeBuilder_ == null) { return tensorShape_ == null ? org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : tensorShape_; } else { return tensorShapeBuilder_.getMessage(); } } /** *
     * 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).
     * 
* * .tensorflow.TensorShapeProto tensor_shape = 3; */ public Builder setTensorShape( org.tensorflow.framework.TensorShapeProto.Builder builderForValue) { if (tensorShapeBuilder_ == null) { tensorShape_ = builderForValue.build(); onChanged(); } else { tensorShapeBuilder_.setMessage(builderForValue.build()); } 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).
     * 
* * .tensorflow.TensorShapeProto tensor_shape = 3; */ public Builder mergeTensorShape(org.tensorflow.framework.TensorShapeProto value) { if (tensorShapeBuilder_ == null) { if (tensorShape_ != null) { tensorShape_ = org.tensorflow.framework.TensorShapeProto.newBuilder(tensorShape_).mergeFrom(value).buildPartial(); } else { tensorShape_ = value; } onChanged(); } else { tensorShapeBuilder_.mergeFrom(value); } return this; } /** *
     * 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 clearTensorShape() { if (tensorShapeBuilder_ == null) { tensorShape_ = null; onChanged(); } else { tensorShape_ = null; tensorShapeBuilder_ = null; } 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).
     * 
* * .tensorflow.TensorShapeProto tensor_shape = 3; */ public org.tensorflow.framework.TensorShapeProto.Builder getTensorShapeBuilder() { onChanged(); return getTensorShapeFieldBuilder().getBuilder(); } /** *
     * 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 org.tensorflow.framework.TensorShapeProtoOrBuilder getTensorShapeOrBuilder() { if (tensorShapeBuilder_ != null) { return tensorShapeBuilder_.getMessageOrBuilder(); } else { return tensorShape_ == null ? org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : 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; */ private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> getTensorShapeFieldBuilder() { if (tensorShapeBuilder_ == null) { tensorShapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>( getTensorShape(), getParentForChildren(), isClean()); tensorShape_ = null; } return tensorShapeBuilder_; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:tensorflow.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 com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public TensorInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TensorInfo(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public org.tensorflow.framework.TensorInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy