diff --git a/.travis.yml b/.travis.yml index 62a2678..5047eeb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,30 +1,67 @@ -language: scala - -scala: - - 2.10.6 +dist: trusty -jdk: - - oraclejdk8 +jdk: oraclejdk8 sudo: required -dist: trusty - cache: directories: - - $HOME/.ivy2/ - - $HOME/.sbt/launchers/ - - $HOME/.cache/spark-versions/ - - $HOME/.sbt/boot/scala-2.10.6/ - - $HOME/.sbt/boot/scala-2.11.8/ + - $HOME/.ivy2/ + - $HOME/.sbt/launchers/ + - $HOME/.cache/spark-versions/ + - $HOME/.sbt/boot/scala-2.10.6/ + - $HOME/.sbt/boot/scala-2.11.8/ env: matrix: - - PIP_BIN=pip PYSPARK_PYTHON=python2 TF_BUILD=tensorflow-1.0.1-cp27-none-linux_x86_64.whl SCALA_BINARY_VERSION="2.11.8" SPARK_VERSION="2.0.2" SPARK_BUILD="spark-2.0.2-bin-hadoop2.7" SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.0.2-bin-hadoop2.7.tgz" - - PIP_BIN=pip PYSPARK_PYTHON=python2 TF_BUILD=tensorflow-1.0.1-cp27-none-linux_x86_64.whl SCALA_BINARY_VERSION="2.11.8" SPARK_VERSION="2.1.0" SPARK_BUILD="spark-2.1.0-bin-hadoop2.7" SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.1.0-bin-hadoop2.7.tgz" - - PIP_BIN=pip PYSPARK_PYTHON=python2 TF_BUILD=tensorflow-1.0.1-cp27-none-linux_x86_64.whl SCALA_BINARY_VERSION="2.10.6" SPARK_VERSION="2.1.0" SPARK_BUILD="spark-2.1.0-bin-hadoop2.7" SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.1.0-bin-hadoop2.7.tgz" - - PIP_BIN=pip3 PYSPARK_PYTHON=python3 TF_BUILD=tensorflow-1.0.1-cp35-cp35m-linux_x86_64.whl SCALA_BINARY_VERSION="2.11.8" SPARK_VERSION="2.1.0" SPARK_BUILD="spark-2.1.0-bin-hadoop2.7" SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.1.0-bin-hadoop2.7.tgz" - - PIP_BIN=pip3 PYSPARK_PYTHON=python3 TF_BUILD=tensorflow-1.0.1-cp35-cp35m-linux_x86_64.whl SCALA_BINARY_VERSION="2.10.6" SPARK_VERSION="2.1.0" SPARK_BUILD="spark-2.1.0-bin-hadoop2.7" SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.1.0-bin-hadoop2.7.tgz" + - SCALA_BINARY_VERSION=2.10.6 SPARK_VERSION=2.0.2 SPARK_BUILD="spark-2.0.2-bin-hadoop2.7" + SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.0.2-bin-hadoop2.7.tgz" + PIP_BIN=pip2 PYSPARK_PYTHON=python2 TF_PY2_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + TF_PY3_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl TF_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + - SCALA_BINARY_VERSION=2.10.6 SPARK_VERSION=2.0.2 SPARK_BUILD="spark-2.0.2-bin-hadoop2.7" + SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.0.2-bin-hadoop2.7.tgz" + PIP_BIN=pip3 PYSPARK_PYTHON=python3 TF_PY2_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + TF_PY3_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl TF_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl + - SCALA_BINARY_VERSION=2.10.6 SPARK_VERSION=2.1.1 SPARK_BUILD="spark-2.1.1-bin-hadoop2.7" + SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.1.1-bin-hadoop2.7.tgz" + PIP_BIN=pip2 PYSPARK_PYTHON=python2 TF_PY2_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + TF_PY3_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl TF_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + - SCALA_BINARY_VERSION=2.10.6 SPARK_VERSION=2.1.1 SPARK_BUILD="spark-2.1.1-bin-hadoop2.7" + SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.1.1-bin-hadoop2.7.tgz" + PIP_BIN=pip3 PYSPARK_PYTHON=python3 TF_PY2_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + TF_PY3_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl TF_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl + - SCALA_BINARY_VERSION=2.10.6 SPARK_VERSION=2.2.0 SPARK_BUILD="spark-2.2.0-bin-hadoop2.7" + SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.2.0-bin-hadoop2.7.tgz" + PIP_BIN=pip2 PYSPARK_PYTHON=python2 TF_PY2_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + TF_PY3_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl TF_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + - SCALA_BINARY_VERSION=2.10.6 SPARK_VERSION=2.2.0 SPARK_BUILD="spark-2.2.0-bin-hadoop2.7" + SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.2.0-bin-hadoop2.7.tgz" + PIP_BIN=pip3 PYSPARK_PYTHON=python3 TF_PY2_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + TF_PY3_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl TF_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl + - SCALA_BINARY_VERSION=2.11.8 SPARK_VERSION=2.0.2 SPARK_BUILD="spark-2.0.2-bin-hadoop2.7" + SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.0.2-bin-hadoop2.7.tgz" + PIP_BIN=pip2 PYSPARK_PYTHON=python2 TF_PY2_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + TF_PY3_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl TF_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + - SCALA_BINARY_VERSION=2.11.8 SPARK_VERSION=2.0.2 SPARK_BUILD="spark-2.0.2-bin-hadoop2.7" + SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.0.2-bin-hadoop2.7.tgz" + PIP_BIN=pip3 PYSPARK_PYTHON=python3 TF_PY2_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + TF_PY3_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl TF_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl + - SCALA_BINARY_VERSION=2.11.8 SPARK_VERSION=2.1.1 SPARK_BUILD="spark-2.1.1-bin-hadoop2.7" + SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.1.1-bin-hadoop2.7.tgz" + PIP_BIN=pip2 PYSPARK_PYTHON=python2 TF_PY2_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + TF_PY3_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl TF_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + - SCALA_BINARY_VERSION=2.11.8 SPARK_VERSION=2.1.1 SPARK_BUILD="spark-2.1.1-bin-hadoop2.7" + SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.1.1-bin-hadoop2.7.tgz" + PIP_BIN=pip3 PYSPARK_PYTHON=python3 TF_PY2_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + TF_PY3_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl TF_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl + - SCALA_BINARY_VERSION=2.11.8 SPARK_VERSION=2.2.0 SPARK_BUILD="spark-2.2.0-bin-hadoop2.7" + SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.2.0-bin-hadoop2.7.tgz" + PIP_BIN=pip2 PYSPARK_PYTHON=python2 TF_PY2_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + TF_PY3_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl TF_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + - SCALA_BINARY_VERSION=2.11.8 SPARK_VERSION=2.2.0 SPARK_BUILD="spark-2.2.0-bin-hadoop2.7" + SPARK_BUILD_URL="http://d3kbcqa49mib13.cloudfront.net/spark-2.2.0-bin-hadoop2.7.tgz" + PIP_BIN=pip3 PYSPARK_PYTHON=python3 TF_PY2_BUILD=tensorflow-1.3.0-cp27-none-linux_x86_64.whl + TF_PY3_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl TF_BUILD=tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl before_install: - ./bin/download_travis_dependencies.sh @@ -34,7 +71,7 @@ install: - $PIP_BIN install --user --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/$TF_BUILD # We also install a python 2 version of Tensorflow. It is used in the Scala tests to make sure that # the protos produced by scala and python are binary identical. - - pip install --user --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.1-cp27-none-linux_x86_64.whl + - pip install --user --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/${TF_PY2_BUILD} script: - rm -rf /home/travis/.javacpp @@ -45,4 +82,3 @@ script: # Run the python unit tests. - sbt -Dspark.version=$SPARK_VERSION -Dscala.version=$SCALA_BINARY_VERSION tfs_testing/assembly - SPARK_HOME=$HOME/.cache/spark-versions/$SPARK_BUILD ./python/run-tests.sh - diff --git a/project/Build.scala b/project/Build.scala index a2ed318..817742f 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -51,7 +51,9 @@ object Shading extends Build { "com.typesafe.scala-logging" %% "scala-logging-api" % "2.1.2", "com.typesafe.scala-logging" %% "scala-logging-slf4j" % "2.1.2", // TensorFlow dependencies - "org.tensorflow" % "tensorflow" % targetTensorFlowVersion + "org.tensorflow" % "tensorflow" % targetTensorFlowVersion, + "org.tensorflow" % "proto" % targetTensorFlowVersion, + "org.tensorflow" % "libtensorflow" % targetTensorFlowVersion ) lazy val testDependencies = Seq( diff --git a/src/main/java/org/tensorflow/framework/AllocationDescription.java b/src/main/java/org/tensorflow/framework/AllocationDescription.java deleted file mode 100644 index b6f32b6..0000000 --- a/src/main/java/org/tensorflow/framework/AllocationDescription.java +++ /dev/null @@ -1,748 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/allocation_description.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.AllocationDescription} - */ -public final class AllocationDescription extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.AllocationDescription) - AllocationDescriptionOrBuilder { - // Use AllocationDescription.newBuilder() to construct. - private AllocationDescription(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private AllocationDescription() { - requestedBytes_ = 0L; - allocatedBytes_ = 0L; - allocatorName_ = ""; - allocationId_ = 0L; - hasSingleReference_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private AllocationDescription( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 8: { - - requestedBytes_ = input.readInt64(); - break; - } - case 16: { - - allocatedBytes_ = input.readInt64(); - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - allocatorName_ = s; - break; - } - case 32: { - - allocationId_ = input.readInt64(); - break; - } - case 40: { - - hasSingleReference_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.AllocationDescriptionProtos.internal_static_tensorflow_AllocationDescription_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.AllocationDescriptionProtos.internal_static_tensorflow_AllocationDescription_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.AllocationDescription.class, org.tensorflow.framework.AllocationDescription.Builder.class); - } - - public static final int REQUESTED_BYTES_FIELD_NUMBER = 1; - private long requestedBytes_; - /** - * optional int64 requested_bytes = 1; - * - *
-   * Total number of bytes requested
-   * 
- */ - public long getRequestedBytes() { - return requestedBytes_; - } - - public static final int ALLOCATED_BYTES_FIELD_NUMBER = 2; - private long allocatedBytes_; - /** - * optional int64 allocated_bytes = 2; - * - *
-   * Total number of bytes allocated if known
-   * 
- */ - public long getAllocatedBytes() { - return allocatedBytes_; - } - - public static final int ALLOCATOR_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object allocatorName_; - /** - * optional string allocator_name = 3; - * - *
-   * Name of the allocator used
-   * 
- */ - public java.lang.String getAllocatorName() { - java.lang.Object ref = allocatorName_; - 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(); - allocatorName_ = s; - return s; - } - } - /** - * optional string allocator_name = 3; - * - *
-   * Name of the allocator used
-   * 
- */ - public com.google.protobuf.ByteString - getAllocatorNameBytes() { - java.lang.Object ref = allocatorName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - allocatorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ALLOCATION_ID_FIELD_NUMBER = 4; - private long allocationId_; - /** - * optional int64 allocation_id = 4; - * - *
-   * Identifier of the allocated buffer if known
-   * 
- */ - public long getAllocationId() { - return allocationId_; - } - - public static final int HAS_SINGLE_REFERENCE_FIELD_NUMBER = 5; - private boolean hasSingleReference_; - /** - * optional bool has_single_reference = 5; - * - *
-   * Set if this tensor only has one remaining reference
-   * 
- */ - public boolean getHasSingleReference() { - return hasSingleReference_; - } - - 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 (requestedBytes_ != 0L) { - output.writeInt64(1, requestedBytes_); - } - if (allocatedBytes_ != 0L) { - output.writeInt64(2, allocatedBytes_); - } - if (!getAllocatorNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, allocatorName_); - } - if (allocationId_ != 0L) { - output.writeInt64(4, allocationId_); - } - if (hasSingleReference_ != false) { - output.writeBool(5, hasSingleReference_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (requestedBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, requestedBytes_); - } - if (allocatedBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, allocatedBytes_); - } - if (!getAllocatorNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, allocatorName_); - } - if (allocationId_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, allocationId_); - } - if (hasSingleReference_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, hasSingleReference_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.AllocationDescription parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.AllocationDescription 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.AllocationDescription parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.AllocationDescription parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.AllocationDescription parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.AllocationDescription parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.AllocationDescription parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.AllocationDescription parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.AllocationDescription parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.AllocationDescription parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.AllocationDescription 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.AllocationDescription} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.AllocationDescription) - org.tensorflow.framework.AllocationDescriptionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.AllocationDescriptionProtos.internal_static_tensorflow_AllocationDescription_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.AllocationDescriptionProtos.internal_static_tensorflow_AllocationDescription_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.AllocationDescription.class, org.tensorflow.framework.AllocationDescription.Builder.class); - } - - // Construct using org.tensorflow.framework.AllocationDescription.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - requestedBytes_ = 0L; - - allocatedBytes_ = 0L; - - allocatorName_ = ""; - - allocationId_ = 0L; - - hasSingleReference_ = false; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.AllocationDescriptionProtos.internal_static_tensorflow_AllocationDescription_descriptor; - } - - public org.tensorflow.framework.AllocationDescription getDefaultInstanceForType() { - return org.tensorflow.framework.AllocationDescription.getDefaultInstance(); - } - - public org.tensorflow.framework.AllocationDescription build() { - org.tensorflow.framework.AllocationDescription result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.AllocationDescription buildPartial() { - org.tensorflow.framework.AllocationDescription result = new org.tensorflow.framework.AllocationDescription(this); - result.requestedBytes_ = requestedBytes_; - result.allocatedBytes_ = allocatedBytes_; - result.allocatorName_ = allocatorName_; - result.allocationId_ = allocationId_; - result.hasSingleReference_ = hasSingleReference_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.AllocationDescription) { - return mergeFrom((org.tensorflow.framework.AllocationDescription)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.AllocationDescription other) { - if (other == org.tensorflow.framework.AllocationDescription.getDefaultInstance()) return this; - if (other.getRequestedBytes() != 0L) { - setRequestedBytes(other.getRequestedBytes()); - } - if (other.getAllocatedBytes() != 0L) { - setAllocatedBytes(other.getAllocatedBytes()); - } - if (!other.getAllocatorName().isEmpty()) { - allocatorName_ = other.allocatorName_; - onChanged(); - } - if (other.getAllocationId() != 0L) { - setAllocationId(other.getAllocationId()); - } - if (other.getHasSingleReference() != false) { - setHasSingleReference(other.getHasSingleReference()); - } - 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.AllocationDescription parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.AllocationDescription) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long requestedBytes_ ; - /** - * optional int64 requested_bytes = 1; - * - *
-     * Total number of bytes requested
-     * 
- */ - public long getRequestedBytes() { - return requestedBytes_; - } - /** - * optional int64 requested_bytes = 1; - * - *
-     * Total number of bytes requested
-     * 
- */ - public Builder setRequestedBytes(long value) { - - requestedBytes_ = value; - onChanged(); - return this; - } - /** - * optional int64 requested_bytes = 1; - * - *
-     * Total number of bytes requested
-     * 
- */ - public Builder clearRequestedBytes() { - - requestedBytes_ = 0L; - onChanged(); - return this; - } - - private long allocatedBytes_ ; - /** - * optional int64 allocated_bytes = 2; - * - *
-     * Total number of bytes allocated if known
-     * 
- */ - public long getAllocatedBytes() { - return allocatedBytes_; - } - /** - * optional int64 allocated_bytes = 2; - * - *
-     * Total number of bytes allocated if known
-     * 
- */ - public Builder setAllocatedBytes(long value) { - - allocatedBytes_ = value; - onChanged(); - return this; - } - /** - * optional int64 allocated_bytes = 2; - * - *
-     * Total number of bytes allocated if known
-     * 
- */ - public Builder clearAllocatedBytes() { - - allocatedBytes_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object allocatorName_ = ""; - /** - * optional string allocator_name = 3; - * - *
-     * Name of the allocator used
-     * 
- */ - public java.lang.String getAllocatorName() { - java.lang.Object ref = allocatorName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - allocatorName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string allocator_name = 3; - * - *
-     * Name of the allocator used
-     * 
- */ - public com.google.protobuf.ByteString - getAllocatorNameBytes() { - java.lang.Object ref = allocatorName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - allocatorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string allocator_name = 3; - * - *
-     * Name of the allocator used
-     * 
- */ - public Builder setAllocatorName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - allocatorName_ = value; - onChanged(); - return this; - } - /** - * optional string allocator_name = 3; - * - *
-     * Name of the allocator used
-     * 
- */ - public Builder clearAllocatorName() { - - allocatorName_ = getDefaultInstance().getAllocatorName(); - onChanged(); - return this; - } - /** - * optional string allocator_name = 3; - * - *
-     * Name of the allocator used
-     * 
- */ - public Builder setAllocatorNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - allocatorName_ = value; - onChanged(); - return this; - } - - private long allocationId_ ; - /** - * optional int64 allocation_id = 4; - * - *
-     * Identifier of the allocated buffer if known
-     * 
- */ - public long getAllocationId() { - return allocationId_; - } - /** - * optional int64 allocation_id = 4; - * - *
-     * Identifier of the allocated buffer if known
-     * 
- */ - public Builder setAllocationId(long value) { - - allocationId_ = value; - onChanged(); - return this; - } - /** - * optional int64 allocation_id = 4; - * - *
-     * Identifier of the allocated buffer if known
-     * 
- */ - public Builder clearAllocationId() { - - allocationId_ = 0L; - onChanged(); - return this; - } - - private boolean hasSingleReference_ ; - /** - * optional bool has_single_reference = 5; - * - *
-     * Set if this tensor only has one remaining reference
-     * 
- */ - public boolean getHasSingleReference() { - return hasSingleReference_; - } - /** - * optional bool has_single_reference = 5; - * - *
-     * Set if this tensor only has one remaining reference
-     * 
- */ - public Builder setHasSingleReference(boolean value) { - - hasSingleReference_ = value; - onChanged(); - return this; - } - /** - * optional bool has_single_reference = 5; - * - *
-     * Set if this tensor only has one remaining reference
-     * 
- */ - public Builder clearHasSingleReference() { - - hasSingleReference_ = false; - 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.AllocationDescription) - } - - // @@protoc_insertion_point(class_scope:tensorflow.AllocationDescription) - private static final org.tensorflow.framework.AllocationDescription DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.AllocationDescription(); - } - - public static org.tensorflow.framework.AllocationDescription getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public AllocationDescription parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new AllocationDescription(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.AllocationDescription getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/AllocationDescriptionOrBuilder.java b/src/main/java/org/tensorflow/framework/AllocationDescriptionOrBuilder.java deleted file mode 100644 index 32a1354..0000000 --- a/src/main/java/org/tensorflow/framework/AllocationDescriptionOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/allocation_description.proto - -package org.tensorflow.framework; - -public interface AllocationDescriptionOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.AllocationDescription) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int64 requested_bytes = 1; - * - *
-   * Total number of bytes requested
-   * 
- */ - long getRequestedBytes(); - - /** - * optional int64 allocated_bytes = 2; - * - *
-   * Total number of bytes allocated if known
-   * 
- */ - long getAllocatedBytes(); - - /** - * optional string allocator_name = 3; - * - *
-   * Name of the allocator used
-   * 
- */ - java.lang.String getAllocatorName(); - /** - * optional string allocator_name = 3; - * - *
-   * Name of the allocator used
-   * 
- */ - com.google.protobuf.ByteString - getAllocatorNameBytes(); - - /** - * optional int64 allocation_id = 4; - * - *
-   * Identifier of the allocated buffer if known
-   * 
- */ - long getAllocationId(); - - /** - * optional bool has_single_reference = 5; - * - *
-   * Set if this tensor only has one remaining reference
-   * 
- */ - boolean getHasSingleReference(); -} diff --git a/src/main/java/org/tensorflow/framework/AllocationDescriptionProtos.java b/src/main/java/org/tensorflow/framework/AllocationDescriptionProtos.java deleted file mode 100644 index e274183..0000000 --- a/src/main/java/org/tensorflow/framework/AllocationDescriptionProtos.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/allocation_description.proto - -package org.tensorflow.framework; - -public final class AllocationDescriptionProtos { - private AllocationDescriptionProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_AllocationDescription_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_AllocationDescription_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n6tensorflow/core/framework/allocation_d" + - "escription.proto\022\ntensorflow\"\226\001\n\025Allocat" + - "ionDescription\022\027\n\017requested_bytes\030\001 \001(\003\022" + - "\027\n\017allocated_bytes\030\002 \001(\003\022\026\n\016allocator_na" + - "me\030\003 \001(\t\022\025\n\rallocation_id\030\004 \001(\003\022\034\n\024has_s" + - "ingle_reference\030\005 \001(\010B9\n\030org.tensorflow." + - "frameworkB\033AllocationDescriptionProtosP\001" + - "b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_tensorflow_AllocationDescription_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_tensorflow_AllocationDescription_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_AllocationDescription_descriptor, - new java.lang.String[] { "RequestedBytes", "AllocatedBytes", "AllocatorName", "AllocationId", "HasSingleReference", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/org/tensorflow/framework/AllocatorMemoryUsed.java b/src/main/java/org/tensorflow/framework/AllocatorMemoryUsed.java deleted file mode 100644 index e68dabb..0000000 --- a/src/main/java/org/tensorflow/framework/AllocatorMemoryUsed.java +++ /dev/null @@ -1,548 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/step_stats.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.AllocatorMemoryUsed} - */ -public final class AllocatorMemoryUsed extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.AllocatorMemoryUsed) - AllocatorMemoryUsedOrBuilder { - // Use AllocatorMemoryUsed.newBuilder() to construct. - private AllocatorMemoryUsed(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private AllocatorMemoryUsed() { - allocatorName_ = ""; - totalBytes_ = 0L; - peakBytes_ = 0L; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private AllocatorMemoryUsed( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - String s = input.readStringRequireUtf8(); - - allocatorName_ = s; - break; - } - case 16: { - - totalBytes_ = input.readInt64(); - break; - } - case 24: { - - peakBytes_ = input.readInt64(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.AllocatorMemoryUsed.class, org.tensorflow.framework.AllocatorMemoryUsed.Builder.class); - } - - public static final int ALLOCATOR_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object allocatorName_; - /** - * optional string allocator_name = 1; - */ - public java.lang.String getAllocatorName() { - java.lang.Object ref = allocatorName_; - 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(); - allocatorName_ = s; - return s; - } - } - /** - * optional string allocator_name = 1; - */ - public com.google.protobuf.ByteString - getAllocatorNameBytes() { - java.lang.Object ref = allocatorName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - allocatorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TOTAL_BYTES_FIELD_NUMBER = 2; - private long totalBytes_; - /** - * optional int64 total_bytes = 2; - */ - public long getTotalBytes() { - return totalBytes_; - } - - public static final int PEAK_BYTES_FIELD_NUMBER = 3; - private long peakBytes_; - /** - * optional int64 peak_bytes = 3; - */ - public long getPeakBytes() { - return peakBytes_; - } - - 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 (!getAllocatorNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, allocatorName_); - } - if (totalBytes_ != 0L) { - output.writeInt64(2, totalBytes_); - } - if (peakBytes_ != 0L) { - output.writeInt64(3, peakBytes_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getAllocatorNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, allocatorName_); - } - if (totalBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, totalBytes_); - } - if (peakBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, peakBytes_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.AllocatorMemoryUsed parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.AllocatorMemoryUsed 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.AllocatorMemoryUsed parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.AllocatorMemoryUsed parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.AllocatorMemoryUsed parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.AllocatorMemoryUsed parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.AllocatorMemoryUsed parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.AllocatorMemoryUsed parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.AllocatorMemoryUsed parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.AllocatorMemoryUsed parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.AllocatorMemoryUsed 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.AllocatorMemoryUsed} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.AllocatorMemoryUsed) - org.tensorflow.framework.AllocatorMemoryUsedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.AllocatorMemoryUsed.class, org.tensorflow.framework.AllocatorMemoryUsed.Builder.class); - } - - // Construct using org.tensorflow.framework.AllocatorMemoryUsed.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - allocatorName_ = ""; - - totalBytes_ = 0L; - - peakBytes_ = 0L; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_descriptor; - } - - public org.tensorflow.framework.AllocatorMemoryUsed getDefaultInstanceForType() { - return org.tensorflow.framework.AllocatorMemoryUsed.getDefaultInstance(); - } - - public org.tensorflow.framework.AllocatorMemoryUsed build() { - org.tensorflow.framework.AllocatorMemoryUsed result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.AllocatorMemoryUsed buildPartial() { - org.tensorflow.framework.AllocatorMemoryUsed result = new org.tensorflow.framework.AllocatorMemoryUsed(this); - result.allocatorName_ = allocatorName_; - result.totalBytes_ = totalBytes_; - result.peakBytes_ = peakBytes_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.AllocatorMemoryUsed) { - return mergeFrom((org.tensorflow.framework.AllocatorMemoryUsed)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.AllocatorMemoryUsed other) { - if (other == org.tensorflow.framework.AllocatorMemoryUsed.getDefaultInstance()) return this; - if (!other.getAllocatorName().isEmpty()) { - allocatorName_ = other.allocatorName_; - onChanged(); - } - if (other.getTotalBytes() != 0L) { - setTotalBytes(other.getTotalBytes()); - } - if (other.getPeakBytes() != 0L) { - setPeakBytes(other.getPeakBytes()); - } - 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.AllocatorMemoryUsed parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.AllocatorMemoryUsed) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object allocatorName_ = ""; - /** - * optional string allocator_name = 1; - */ - public java.lang.String getAllocatorName() { - java.lang.Object ref = allocatorName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - allocatorName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string allocator_name = 1; - */ - public com.google.protobuf.ByteString - getAllocatorNameBytes() { - java.lang.Object ref = allocatorName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - allocatorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string allocator_name = 1; - */ - public Builder setAllocatorName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - allocatorName_ = value; - onChanged(); - return this; - } - /** - * optional string allocator_name = 1; - */ - public Builder clearAllocatorName() { - - allocatorName_ = getDefaultInstance().getAllocatorName(); - onChanged(); - return this; - } - /** - * optional string allocator_name = 1; - */ - public Builder setAllocatorNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - allocatorName_ = value; - onChanged(); - return this; - } - - private long totalBytes_ ; - /** - * optional int64 total_bytes = 2; - */ - public long getTotalBytes() { - return totalBytes_; - } - /** - * optional int64 total_bytes = 2; - */ - public Builder setTotalBytes(long value) { - - totalBytes_ = value; - onChanged(); - return this; - } - /** - * optional int64 total_bytes = 2; - */ - public Builder clearTotalBytes() { - - totalBytes_ = 0L; - onChanged(); - return this; - } - - private long peakBytes_ ; - /** - * optional int64 peak_bytes = 3; - */ - public long getPeakBytes() { - return peakBytes_; - } - /** - * optional int64 peak_bytes = 3; - */ - public Builder setPeakBytes(long value) { - - peakBytes_ = value; - onChanged(); - return this; - } - /** - * optional int64 peak_bytes = 3; - */ - public Builder clearPeakBytes() { - - peakBytes_ = 0L; - 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.AllocatorMemoryUsed) - } - - // @@protoc_insertion_point(class_scope:tensorflow.AllocatorMemoryUsed) - private static final org.tensorflow.framework.AllocatorMemoryUsed DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.AllocatorMemoryUsed(); - } - - public static org.tensorflow.framework.AllocatorMemoryUsed getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public AllocatorMemoryUsed parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new AllocatorMemoryUsed(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.AllocatorMemoryUsed getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/AllocatorMemoryUsedOrBuilder.java b/src/main/java/org/tensorflow/framework/AllocatorMemoryUsedOrBuilder.java deleted file mode 100644 index cdd8892..0000000 --- a/src/main/java/org/tensorflow/framework/AllocatorMemoryUsedOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/step_stats.proto - -package org.tensorflow.framework; - -public interface AllocatorMemoryUsedOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.AllocatorMemoryUsed) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string allocator_name = 1; - */ - java.lang.String getAllocatorName(); - /** - * optional string allocator_name = 1; - */ - com.google.protobuf.ByteString - getAllocatorNameBytes(); - - /** - * optional int64 total_bytes = 2; - */ - long getTotalBytes(); - - /** - * optional int64 peak_bytes = 3; - */ - long getPeakBytes(); -} diff --git a/src/main/java/org/tensorflow/framework/AttrValue.java b/src/main/java/org/tensorflow/framework/AttrValue.java deleted file mode 100644 index 8d4cbf4..0000000 --- a/src/main/java/org/tensorflow/framework/AttrValue.java +++ /dev/null @@ -1,4411 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/attr_value.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.AttrValue} - * - *
- * Protocol buffer representing the value for an attr used to configure an Op.
- * Comment indicates the corresponding attr type.  Only the field matching the
- * attr type may be filled.
- * 
- */ -public final class AttrValue extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.AttrValue) - AttrValueOrBuilder { - // Use AttrValue.newBuilder() to construct. - private AttrValue(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private AttrValue() { - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private AttrValue( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - org.tensorflow.framework.AttrValue.ListValue.Builder subBuilder = null; - if (valueCase_ == 1) { - subBuilder = ((org.tensorflow.framework.AttrValue.ListValue) value_).toBuilder(); - } - value_ = - input.readMessage(org.tensorflow.framework.AttrValue.ListValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((org.tensorflow.framework.AttrValue.ListValue) value_); - value_ = subBuilder.buildPartial(); - } - valueCase_ = 1; - break; - } - case 18: { - valueCase_ = 2; - value_ = input.readBytes(); - break; - } - case 24: { - valueCase_ = 3; - value_ = input.readInt64(); - break; - } - case 37: { - valueCase_ = 4; - value_ = input.readFloat(); - break; - } - case 40: { - valueCase_ = 5; - value_ = input.readBool(); - break; - } - case 48: { - int rawValue = input.readEnum(); - valueCase_ = 6; - value_ = rawValue; - break; - } - case 58: { - org.tensorflow.framework.TensorShapeProto.Builder subBuilder = null; - if (valueCase_ == 7) { - subBuilder = ((org.tensorflow.framework.TensorShapeProto) value_).toBuilder(); - } - value_ = - input.readMessage(org.tensorflow.framework.TensorShapeProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((org.tensorflow.framework.TensorShapeProto) value_); - value_ = subBuilder.buildPartial(); - } - valueCase_ = 7; - break; - } - case 66: { - org.tensorflow.framework.TensorProto.Builder subBuilder = null; - if (valueCase_ == 8) { - subBuilder = ((org.tensorflow.framework.TensorProto) value_).toBuilder(); - } - value_ = - input.readMessage(org.tensorflow.framework.TensorProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((org.tensorflow.framework.TensorProto) value_); - value_ = subBuilder.buildPartial(); - } - valueCase_ = 8; - break; - } - case 74: { - String s = input.readStringRequireUtf8(); - valueCase_ = 9; - value_ = s; - break; - } - case 82: { - org.tensorflow.framework.NameAttrList.Builder subBuilder = null; - if (valueCase_ == 10) { - subBuilder = ((org.tensorflow.framework.NameAttrList) value_).toBuilder(); - } - value_ = - input.readMessage(org.tensorflow.framework.NameAttrList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((org.tensorflow.framework.NameAttrList) value_); - value_ = subBuilder.buildPartial(); - } - valueCase_ = 10; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.AttrValue.class, org.tensorflow.framework.AttrValue.Builder.class); - } - - public interface ListValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.AttrValue.ListValue) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated bytes s = 2; - * - *
-     * "list(string)"
-     * 
- */ - java.util.List getSList(); - /** - * repeated bytes s = 2; - * - *
-     * "list(string)"
-     * 
- */ - int getSCount(); - /** - * repeated bytes s = 2; - * - *
-     * "list(string)"
-     * 
- */ - com.google.protobuf.ByteString getS(int index); - - /** - * repeated int64 i = 3 [packed = true]; - * - *
-     * "list(int)"
-     * 
- */ - java.util.List getIList(); - /** - * repeated int64 i = 3 [packed = true]; - * - *
-     * "list(int)"
-     * 
- */ - int getICount(); - /** - * repeated int64 i = 3 [packed = true]; - * - *
-     * "list(int)"
-     * 
- */ - long getI(int index); - - /** - * repeated float f = 4 [packed = true]; - * - *
-     * "list(float)"
-     * 
- */ - java.util.List getFList(); - /** - * repeated float f = 4 [packed = true]; - * - *
-     * "list(float)"
-     * 
- */ - int getFCount(); - /** - * repeated float f = 4 [packed = true]; - * - *
-     * "list(float)"
-     * 
- */ - float getF(int index); - - /** - * repeated bool b = 5 [packed = true]; - * - *
-     * "list(bool)"
-     * 
- */ - java.util.List getBList(); - /** - * repeated bool b = 5 [packed = true]; - * - *
-     * "list(bool)"
-     * 
- */ - int getBCount(); - /** - * repeated bool b = 5 [packed = true]; - * - *
-     * "list(bool)"
-     * 
- */ - boolean getB(int index); - - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-     * "list(type)"
-     * 
- */ - java.util.List getTypeList(); - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-     * "list(type)"
-     * 
- */ - int getTypeCount(); - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-     * "list(type)"
-     * 
- */ - org.tensorflow.framework.DataType getType(int index); - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-     * "list(type)"
-     * 
- */ - java.util.List - getTypeValueList(); - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-     * "list(type)"
-     * 
- */ - int getTypeValue(int index); - - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "list(shape)"
-     * 
- */ - java.util.List - getShapeList(); - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "list(shape)"
-     * 
- */ - org.tensorflow.framework.TensorShapeProto getShape(int index); - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "list(shape)"
-     * 
- */ - int getShapeCount(); - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "list(shape)"
-     * 
- */ - java.util.List - getShapeOrBuilderList(); - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "list(shape)"
-     * 
- */ - org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder( - int index); - - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-     * "list(tensor)"
-     * 
- */ - java.util.List - getTensorList(); - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-     * "list(tensor)"
-     * 
- */ - org.tensorflow.framework.TensorProto getTensor(int index); - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-     * "list(tensor)"
-     * 
- */ - int getTensorCount(); - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-     * "list(tensor)"
-     * 
- */ - java.util.List - getTensorOrBuilderList(); - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-     * "list(tensor)"
-     * 
- */ - org.tensorflow.framework.TensorProtoOrBuilder getTensorOrBuilder( - int index); - } - /** - * Protobuf type {@code tensorflow.AttrValue.ListValue} - */ - public static final class ListValue extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.AttrValue.ListValue) - ListValueOrBuilder { - // Use ListValue.newBuilder() to construct. - private ListValue(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ListValue() { - s_ = java.util.Collections.emptyList(); - i_ = java.util.Collections.emptyList(); - f_ = java.util.Collections.emptyList(); - b_ = java.util.Collections.emptyList(); - type_ = java.util.Collections.emptyList(); - shape_ = java.util.Collections.emptyList(); - tensor_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ListValue( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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 18: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - s_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - s_.add(input.readBytes()); - break; - } - case 24: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - i_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - i_.add(input.readInt64()); - break; - } - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) { - i_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - i_.add(input.readInt64()); - } - input.popLimit(limit); - break; - } - case 37: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - f_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - f_.add(input.readFloat()); - break; - } - case 34: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) { - f_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - while (input.getBytesUntilLimit() > 0) { - f_.add(input.readFloat()); - } - input.popLimit(limit); - break; - } - case 40: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - b_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - b_.add(input.readBool()); - break; - } - case 42: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) { - b_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - while (input.getBytesUntilLimit() > 0) { - b_.add(input.readBool()); - } - input.popLimit(limit); - break; - } - case 48: { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - type_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - type_.add(rawValue); - break; - } - case 50: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - type_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - type_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - shape_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - shape_.add(input.readMessage(org.tensorflow.framework.TensorShapeProto.parser(), extensionRegistry)); - break; - } - case 66: { - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - tensor_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - tensor_.add(input.readMessage(org.tensorflow.framework.TensorProto.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - s_ = java.util.Collections.unmodifiableList(s_); - } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - i_ = java.util.Collections.unmodifiableList(i_); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - f_ = java.util.Collections.unmodifiableList(f_); - } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - b_ = java.util.Collections.unmodifiableList(b_); - } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - type_ = java.util.Collections.unmodifiableList(type_); - } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - shape_ = java.util.Collections.unmodifiableList(shape_); - } - if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - tensor_ = java.util.Collections.unmodifiableList(tensor_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.AttrValue.ListValue.class, org.tensorflow.framework.AttrValue.ListValue.Builder.class); - } - - public static final int S_FIELD_NUMBER = 2; - private java.util.List s_; - /** - * repeated bytes s = 2; - * - *
-     * "list(string)"
-     * 
- */ - public java.util.List - getSList() { - return s_; - } - /** - * repeated bytes s = 2; - * - *
-     * "list(string)"
-     * 
- */ - public int getSCount() { - return s_.size(); - } - /** - * repeated bytes s = 2; - * - *
-     * "list(string)"
-     * 
- */ - public com.google.protobuf.ByteString getS(int index) { - return s_.get(index); - } - - public static final int I_FIELD_NUMBER = 3; - private java.util.List i_; - /** - * repeated int64 i = 3 [packed = true]; - * - *
-     * "list(int)"
-     * 
- */ - public java.util.List - getIList() { - return i_; - } - /** - * repeated int64 i = 3 [packed = true]; - * - *
-     * "list(int)"
-     * 
- */ - public int getICount() { - return i_.size(); - } - /** - * repeated int64 i = 3 [packed = true]; - * - *
-     * "list(int)"
-     * 
- */ - public long getI(int index) { - return i_.get(index); - } - private int iMemoizedSerializedSize = -1; - - public static final int F_FIELD_NUMBER = 4; - private java.util.List f_; - /** - * repeated float f = 4 [packed = true]; - * - *
-     * "list(float)"
-     * 
- */ - public java.util.List - getFList() { - return f_; - } - /** - * repeated float f = 4 [packed = true]; - * - *
-     * "list(float)"
-     * 
- */ - public int getFCount() { - return f_.size(); - } - /** - * repeated float f = 4 [packed = true]; - * - *
-     * "list(float)"
-     * 
- */ - public float getF(int index) { - return f_.get(index); - } - private int fMemoizedSerializedSize = -1; - - public static final int B_FIELD_NUMBER = 5; - private java.util.List b_; - /** - * repeated bool b = 5 [packed = true]; - * - *
-     * "list(bool)"
-     * 
- */ - public java.util.List - getBList() { - return b_; - } - /** - * repeated bool b = 5 [packed = true]; - * - *
-     * "list(bool)"
-     * 
- */ - public int getBCount() { - return b_.size(); - } - /** - * repeated bool b = 5 [packed = true]; - * - *
-     * "list(bool)"
-     * 
- */ - public boolean getB(int index) { - return b_.get(index); - } - private int bMemoizedSerializedSize = -1; - - public static final int TYPE_FIELD_NUMBER = 6; - private java.util.List type_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, org.tensorflow.framework.DataType> type_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, org.tensorflow.framework.DataType>() { - public org.tensorflow.framework.DataType convert(java.lang.Integer from) { - org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(from); - return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result; - } - }; - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-     * "list(type)"
-     * 
- */ - public java.util.List getTypeList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, org.tensorflow.framework.DataType>(type_, type_converter_); - } - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-     * "list(type)"
-     * 
- */ - public int getTypeCount() { - return type_.size(); - } - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-     * "list(type)"
-     * 
- */ - public org.tensorflow.framework.DataType getType(int index) { - return type_converter_.convert(type_.get(index)); - } - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-     * "list(type)"
-     * 
- */ - public java.util.List - getTypeValueList() { - return type_; - } - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-     * "list(type)"
-     * 
- */ - public int getTypeValue(int index) { - return type_.get(index); - } - private int typeMemoizedSerializedSize; - - public static final int SHAPE_FIELD_NUMBER = 7; - private java.util.List shape_; - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "list(shape)"
-     * 
- */ - public java.util.List getShapeList() { - return shape_; - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "list(shape)"
-     * 
- */ - public java.util.List - getShapeOrBuilderList() { - return shape_; - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "list(shape)"
-     * 
- */ - public int getShapeCount() { - return shape_.size(); - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "list(shape)"
-     * 
- */ - public org.tensorflow.framework.TensorShapeProto getShape(int index) { - return shape_.get(index); - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "list(shape)"
-     * 
- */ - public org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder( - int index) { - return shape_.get(index); - } - - public static final int TENSOR_FIELD_NUMBER = 8; - private java.util.List tensor_; - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-     * "list(tensor)"
-     * 
- */ - public java.util.List getTensorList() { - return tensor_; - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-     * "list(tensor)"
-     * 
- */ - public java.util.List - getTensorOrBuilderList() { - return tensor_; - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-     * "list(tensor)"
-     * 
- */ - public int getTensorCount() { - return tensor_.size(); - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-     * "list(tensor)"
-     * 
- */ - public org.tensorflow.framework.TensorProto getTensor(int index) { - return tensor_.get(index); - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-     * "list(tensor)"
-     * 
- */ - public org.tensorflow.framework.TensorProtoOrBuilder getTensorOrBuilder( - int index) { - return tensor_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - for (int i = 0; i < s_.size(); i++) { - output.writeBytes(2, s_.get(i)); - } - if (getIList().size() > 0) { - output.writeRawVarint32(26); - output.writeRawVarint32(iMemoizedSerializedSize); - } - for (int i = 0; i < i_.size(); i++) { - output.writeInt64NoTag(i_.get(i)); - } - if (getFList().size() > 0) { - output.writeRawVarint32(34); - output.writeRawVarint32(fMemoizedSerializedSize); - } - for (int i = 0; i < f_.size(); i++) { - output.writeFloatNoTag(f_.get(i)); - } - if (getBList().size() > 0) { - output.writeRawVarint32(42); - output.writeRawVarint32(bMemoizedSerializedSize); - } - for (int i = 0; i < b_.size(); i++) { - output.writeBoolNoTag(b_.get(i)); - } - if (getTypeList().size() > 0) { - output.writeRawVarint32(50); - output.writeRawVarint32(typeMemoizedSerializedSize); - } - for (int i = 0; i < type_.size(); i++) { - output.writeEnumNoTag(type_.get(i)); - } - for (int i = 0; i < shape_.size(); i++) { - output.writeMessage(7, shape_.get(i)); - } - for (int i = 0; i < tensor_.size(); i++) { - output.writeMessage(8, tensor_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < s_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(s_.get(i)); - } - size += dataSize; - size += 1 * getSList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < i_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt64SizeNoTag(i_.get(i)); - } - size += dataSize; - if (!getIList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - iMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 4 * getFList().size(); - size += dataSize; - if (!getFList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - fMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 1 * getBList().size(); - size += dataSize; - if (!getBList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - bMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < type_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(type_.get(i)); - } - size += dataSize; - if (!getTypeList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeRawVarint32Size(dataSize); - }typeMemoizedSerializedSize = dataSize; - } - for (int i = 0; i < shape_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, shape_.get(i)); - } - for (int i = 0; i < tensor_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, tensor_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.AttrValue.ListValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.AttrValue.ListValue 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.AttrValue.ListValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.AttrValue.ListValue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.AttrValue.ListValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.AttrValue.ListValue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.AttrValue.ListValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.AttrValue.ListValue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.AttrValue.ListValue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.AttrValue.ListValue parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.AttrValue.ListValue 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.AttrValue.ListValue} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.AttrValue.ListValue) - org.tensorflow.framework.AttrValue.ListValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.AttrValue.ListValue.class, org.tensorflow.framework.AttrValue.ListValue.Builder.class); - } - - // Construct using org.tensorflow.framework.AttrValue.ListValue.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getShapeFieldBuilder(); - getTensorFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - s_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - i_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - f_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - b_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - type_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - if (shapeBuilder_ == null) { - shape_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - shapeBuilder_.clear(); - } - if (tensorBuilder_ == null) { - tensor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - } else { - tensorBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_descriptor; - } - - public org.tensorflow.framework.AttrValue.ListValue getDefaultInstanceForType() { - return org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance(); - } - - public org.tensorflow.framework.AttrValue.ListValue build() { - org.tensorflow.framework.AttrValue.ListValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.AttrValue.ListValue buildPartial() { - org.tensorflow.framework.AttrValue.ListValue result = new org.tensorflow.framework.AttrValue.ListValue(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - s_ = java.util.Collections.unmodifiableList(s_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.s_ = s_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - i_ = java.util.Collections.unmodifiableList(i_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.i_ = i_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - f_ = java.util.Collections.unmodifiableList(f_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.f_ = f_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - b_ = java.util.Collections.unmodifiableList(b_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.b_ = b_; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - type_ = java.util.Collections.unmodifiableList(type_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.type_ = type_; - if (shapeBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { - shape_ = java.util.Collections.unmodifiableList(shape_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.shape_ = shape_; - } else { - result.shape_ = shapeBuilder_.build(); - } - if (tensorBuilder_ == null) { - if (((bitField0_ & 0x00000040) == 0x00000040)) { - tensor_ = java.util.Collections.unmodifiableList(tensor_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.tensor_ = tensor_; - } else { - result.tensor_ = tensorBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.AttrValue.ListValue) { - return mergeFrom((org.tensorflow.framework.AttrValue.ListValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.AttrValue.ListValue other) { - if (other == org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance()) return this; - if (!other.s_.isEmpty()) { - if (s_.isEmpty()) { - s_ = other.s_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSIsMutable(); - s_.addAll(other.s_); - } - onChanged(); - } - if (!other.i_.isEmpty()) { - if (i_.isEmpty()) { - i_ = other.i_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureIIsMutable(); - i_.addAll(other.i_); - } - onChanged(); - } - if (!other.f_.isEmpty()) { - if (f_.isEmpty()) { - f_ = other.f_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureFIsMutable(); - f_.addAll(other.f_); - } - onChanged(); - } - if (!other.b_.isEmpty()) { - if (b_.isEmpty()) { - b_ = other.b_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureBIsMutable(); - b_.addAll(other.b_); - } - onChanged(); - } - if (!other.type_.isEmpty()) { - if (type_.isEmpty()) { - type_ = other.type_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureTypeIsMutable(); - type_.addAll(other.type_); - } - onChanged(); - } - if (shapeBuilder_ == null) { - if (!other.shape_.isEmpty()) { - if (shape_.isEmpty()) { - shape_ = other.shape_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureShapeIsMutable(); - shape_.addAll(other.shape_); - } - onChanged(); - } - } else { - if (!other.shape_.isEmpty()) { - if (shapeBuilder_.isEmpty()) { - shapeBuilder_.dispose(); - shapeBuilder_ = null; - shape_ = other.shape_; - bitField0_ = (bitField0_ & ~0x00000020); - shapeBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getShapeFieldBuilder() : null; - } else { - shapeBuilder_.addAllMessages(other.shape_); - } - } - } - if (tensorBuilder_ == null) { - if (!other.tensor_.isEmpty()) { - if (tensor_.isEmpty()) { - tensor_ = other.tensor_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureTensorIsMutable(); - tensor_.addAll(other.tensor_); - } - onChanged(); - } - } else { - if (!other.tensor_.isEmpty()) { - if (tensorBuilder_.isEmpty()) { - tensorBuilder_.dispose(); - tensorBuilder_ = null; - tensor_ = other.tensor_; - bitField0_ = (bitField0_ & ~0x00000040); - tensorBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getTensorFieldBuilder() : null; - } else { - tensorBuilder_.addAllMessages(other.tensor_); - } - } - } - 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.AttrValue.ListValue parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.AttrValue.ListValue) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List s_ = java.util.Collections.emptyList(); - private void ensureSIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - s_ = new java.util.ArrayList(s_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated bytes s = 2; - * - *
-       * "list(string)"
-       * 
- */ - public java.util.List - getSList() { - return java.util.Collections.unmodifiableList(s_); - } - /** - * repeated bytes s = 2; - * - *
-       * "list(string)"
-       * 
- */ - public int getSCount() { - return s_.size(); - } - /** - * repeated bytes s = 2; - * - *
-       * "list(string)"
-       * 
- */ - public com.google.protobuf.ByteString getS(int index) { - return s_.get(index); - } - /** - * repeated bytes s = 2; - * - *
-       * "list(string)"
-       * 
- */ - public Builder setS( - int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSIsMutable(); - s_.set(index, value); - onChanged(); - return this; - } - /** - * repeated bytes s = 2; - * - *
-       * "list(string)"
-       * 
- */ - public Builder addS(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSIsMutable(); - s_.add(value); - onChanged(); - return this; - } - /** - * repeated bytes s = 2; - * - *
-       * "list(string)"
-       * 
- */ - public Builder addAllS( - java.lang.Iterable values) { - ensureSIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, s_); - onChanged(); - return this; - } - /** - * repeated bytes s = 2; - * - *
-       * "list(string)"
-       * 
- */ - public Builder clearS() { - s_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - private java.util.List i_ = java.util.Collections.emptyList(); - private void ensureIIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - i_ = new java.util.ArrayList(i_); - bitField0_ |= 0x00000002; - } - } - /** - * repeated int64 i = 3 [packed = true]; - * - *
-       * "list(int)"
-       * 
- */ - public java.util.List - getIList() { - return java.util.Collections.unmodifiableList(i_); - } - /** - * repeated int64 i = 3 [packed = true]; - * - *
-       * "list(int)"
-       * 
- */ - public int getICount() { - return i_.size(); - } - /** - * repeated int64 i = 3 [packed = true]; - * - *
-       * "list(int)"
-       * 
- */ - public long getI(int index) { - return i_.get(index); - } - /** - * repeated int64 i = 3 [packed = true]; - * - *
-       * "list(int)"
-       * 
- */ - public Builder setI( - int index, long value) { - ensureIIsMutable(); - i_.set(index, value); - onChanged(); - return this; - } - /** - * repeated int64 i = 3 [packed = true]; - * - *
-       * "list(int)"
-       * 
- */ - public Builder addI(long value) { - ensureIIsMutable(); - i_.add(value); - onChanged(); - return this; - } - /** - * repeated int64 i = 3 [packed = true]; - * - *
-       * "list(int)"
-       * 
- */ - public Builder addAllI( - java.lang.Iterable values) { - ensureIIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, i_); - onChanged(); - return this; - } - /** - * repeated int64 i = 3 [packed = true]; - * - *
-       * "list(int)"
-       * 
- */ - public Builder clearI() { - i_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - private java.util.List f_ = java.util.Collections.emptyList(); - private void ensureFIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - f_ = new java.util.ArrayList(f_); - bitField0_ |= 0x00000004; - } - } - /** - * repeated float f = 4 [packed = true]; - * - *
-       * "list(float)"
-       * 
- */ - public java.util.List - getFList() { - return java.util.Collections.unmodifiableList(f_); - } - /** - * repeated float f = 4 [packed = true]; - * - *
-       * "list(float)"
-       * 
- */ - public int getFCount() { - return f_.size(); - } - /** - * repeated float f = 4 [packed = true]; - * - *
-       * "list(float)"
-       * 
- */ - public float getF(int index) { - return f_.get(index); - } - /** - * repeated float f = 4 [packed = true]; - * - *
-       * "list(float)"
-       * 
- */ - public Builder setF( - int index, float value) { - ensureFIsMutable(); - f_.set(index, value); - onChanged(); - return this; - } - /** - * repeated float f = 4 [packed = true]; - * - *
-       * "list(float)"
-       * 
- */ - public Builder addF(float value) { - ensureFIsMutable(); - f_.add(value); - onChanged(); - return this; - } - /** - * repeated float f = 4 [packed = true]; - * - *
-       * "list(float)"
-       * 
- */ - public Builder addAllF( - java.lang.Iterable values) { - ensureFIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, f_); - onChanged(); - return this; - } - /** - * repeated float f = 4 [packed = true]; - * - *
-       * "list(float)"
-       * 
- */ - public Builder clearF() { - f_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - private java.util.List b_ = java.util.Collections.emptyList(); - private void ensureBIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - b_ = new java.util.ArrayList(b_); - bitField0_ |= 0x00000008; - } - } - /** - * repeated bool b = 5 [packed = true]; - * - *
-       * "list(bool)"
-       * 
- */ - public java.util.List - getBList() { - return java.util.Collections.unmodifiableList(b_); - } - /** - * repeated bool b = 5 [packed = true]; - * - *
-       * "list(bool)"
-       * 
- */ - public int getBCount() { - return b_.size(); - } - /** - * repeated bool b = 5 [packed = true]; - * - *
-       * "list(bool)"
-       * 
- */ - public boolean getB(int index) { - return b_.get(index); - } - /** - * repeated bool b = 5 [packed = true]; - * - *
-       * "list(bool)"
-       * 
- */ - public Builder setB( - int index, boolean value) { - ensureBIsMutable(); - b_.set(index, value); - onChanged(); - return this; - } - /** - * repeated bool b = 5 [packed = true]; - * - *
-       * "list(bool)"
-       * 
- */ - public Builder addB(boolean value) { - ensureBIsMutable(); - b_.add(value); - onChanged(); - return this; - } - /** - * repeated bool b = 5 [packed = true]; - * - *
-       * "list(bool)"
-       * 
- */ - public Builder addAllB( - java.lang.Iterable values) { - ensureBIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, b_); - onChanged(); - return this; - } - /** - * repeated bool b = 5 [packed = true]; - * - *
-       * "list(bool)"
-       * 
- */ - public Builder clearB() { - b_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - private java.util.List type_ = - java.util.Collections.emptyList(); - private void ensureTypeIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - type_ = new java.util.ArrayList(type_); - bitField0_ |= 0x00000010; - } - } - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-       * "list(type)"
-       * 
- */ - public java.util.List getTypeList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, org.tensorflow.framework.DataType>(type_, type_converter_); - } - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-       * "list(type)"
-       * 
- */ - public int getTypeCount() { - return type_.size(); - } - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-       * "list(type)"
-       * 
- */ - public org.tensorflow.framework.DataType getType(int index) { - return type_converter_.convert(type_.get(index)); - } - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-       * "list(type)"
-       * 
- */ - public Builder setType( - int index, org.tensorflow.framework.DataType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTypeIsMutable(); - type_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-       * "list(type)"
-       * 
- */ - public Builder addType(org.tensorflow.framework.DataType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTypeIsMutable(); - type_.add(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-       * "list(type)"
-       * 
- */ - public Builder addAllType( - java.lang.Iterable values) { - ensureTypeIsMutable(); - for (org.tensorflow.framework.DataType value : values) { - type_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-       * "list(type)"
-       * 
- */ - public Builder clearType() { - type_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-       * "list(type)"
-       * 
- */ - public java.util.List - getTypeValueList() { - return java.util.Collections.unmodifiableList(type_); - } - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-       * "list(type)"
-       * 
- */ - public int getTypeValue(int index) { - return type_.get(index); - } - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-       * "list(type)"
-       * 
- */ - public Builder setTypeValue( - int index, int value) { - ensureTypeIsMutable(); - type_.set(index, value); - onChanged(); - return this; - } - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-       * "list(type)"
-       * 
- */ - public Builder addTypeValue(int value) { - ensureTypeIsMutable(); - type_.add(value); - onChanged(); - return this; - } - /** - * repeated .tensorflow.DataType type = 6 [packed = true]; - * - *
-       * "list(type)"
-       * 
- */ - public Builder addAllTypeValue( - java.lang.Iterable values) { - ensureTypeIsMutable(); - for (int value : values) { - type_.add(value); - } - onChanged(); - return this; - } - - private java.util.List shape_ = - java.util.Collections.emptyList(); - private void ensureShapeIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - shape_ = new java.util.ArrayList(shape_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> shapeBuilder_; - - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public java.util.List getShapeList() { - if (shapeBuilder_ == null) { - return java.util.Collections.unmodifiableList(shape_); - } else { - return shapeBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public int getShapeCount() { - if (shapeBuilder_ == null) { - return shape_.size(); - } else { - return shapeBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public org.tensorflow.framework.TensorShapeProto getShape(int index) { - if (shapeBuilder_ == null) { - return shape_.get(index); - } else { - return shapeBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public Builder setShape( - int index, org.tensorflow.framework.TensorShapeProto value) { - if (shapeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureShapeIsMutable(); - shape_.set(index, value); - onChanged(); - } else { - shapeBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public Builder setShape( - int index, org.tensorflow.framework.TensorShapeProto.Builder builderForValue) { - if (shapeBuilder_ == null) { - ensureShapeIsMutable(); - shape_.set(index, builderForValue.build()); - onChanged(); - } else { - shapeBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public Builder addShape(org.tensorflow.framework.TensorShapeProto value) { - if (shapeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureShapeIsMutable(); - shape_.add(value); - onChanged(); - } else { - shapeBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public Builder addShape( - int index, org.tensorflow.framework.TensorShapeProto value) { - if (shapeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureShapeIsMutable(); - shape_.add(index, value); - onChanged(); - } else { - shapeBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public Builder addShape( - org.tensorflow.framework.TensorShapeProto.Builder builderForValue) { - if (shapeBuilder_ == null) { - ensureShapeIsMutable(); - shape_.add(builderForValue.build()); - onChanged(); - } else { - shapeBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public Builder addShape( - int index, org.tensorflow.framework.TensorShapeProto.Builder builderForValue) { - if (shapeBuilder_ == null) { - ensureShapeIsMutable(); - shape_.add(index, builderForValue.build()); - onChanged(); - } else { - shapeBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public Builder addAllShape( - java.lang.Iterable values) { - if (shapeBuilder_ == null) { - ensureShapeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, shape_); - onChanged(); - } else { - shapeBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public Builder clearShape() { - if (shapeBuilder_ == null) { - shape_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - shapeBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public Builder removeShape(int index) { - if (shapeBuilder_ == null) { - ensureShapeIsMutable(); - shape_.remove(index); - onChanged(); - } else { - shapeBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public org.tensorflow.framework.TensorShapeProto.Builder getShapeBuilder( - int index) { - return getShapeFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder( - int index) { - if (shapeBuilder_ == null) { - return shape_.get(index); } else { - return shapeBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public java.util.List - getShapeOrBuilderList() { - if (shapeBuilder_ != null) { - return shapeBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(shape_); - } - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public org.tensorflow.framework.TensorShapeProto.Builder addShapeBuilder() { - return getShapeFieldBuilder().addBuilder( - org.tensorflow.framework.TensorShapeProto.getDefaultInstance()); - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public org.tensorflow.framework.TensorShapeProto.Builder addShapeBuilder( - int index) { - return getShapeFieldBuilder().addBuilder( - index, org.tensorflow.framework.TensorShapeProto.getDefaultInstance()); - } - /** - * repeated .tensorflow.TensorShapeProto shape = 7; - * - *
-       * "list(shape)"
-       * 
- */ - public java.util.List - getShapeBuilderList() { - return getShapeFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> - getShapeFieldBuilder() { - if (shapeBuilder_ == null) { - shapeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>( - shape_, - ((bitField0_ & 0x00000020) == 0x00000020), - getParentForChildren(), - isClean()); - shape_ = null; - } - return shapeBuilder_; - } - - private java.util.List tensor_ = - java.util.Collections.emptyList(); - private void ensureTensorIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - tensor_ = new java.util.ArrayList(tensor_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.TensorProto, org.tensorflow.framework.TensorProto.Builder, org.tensorflow.framework.TensorProtoOrBuilder> tensorBuilder_; - - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public java.util.List getTensorList() { - if (tensorBuilder_ == null) { - return java.util.Collections.unmodifiableList(tensor_); - } else { - return tensorBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public int getTensorCount() { - if (tensorBuilder_ == null) { - return tensor_.size(); - } else { - return tensorBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public org.tensorflow.framework.TensorProto getTensor(int index) { - if (tensorBuilder_ == null) { - return tensor_.get(index); - } else { - return tensorBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public Builder setTensor( - int index, org.tensorflow.framework.TensorProto value) { - if (tensorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTensorIsMutable(); - tensor_.set(index, value); - onChanged(); - } else { - tensorBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public Builder setTensor( - int index, org.tensorflow.framework.TensorProto.Builder builderForValue) { - if (tensorBuilder_ == null) { - ensureTensorIsMutable(); - tensor_.set(index, builderForValue.build()); - onChanged(); - } else { - tensorBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public Builder addTensor(org.tensorflow.framework.TensorProto value) { - if (tensorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTensorIsMutable(); - tensor_.add(value); - onChanged(); - } else { - tensorBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public Builder addTensor( - int index, org.tensorflow.framework.TensorProto value) { - if (tensorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTensorIsMutable(); - tensor_.add(index, value); - onChanged(); - } else { - tensorBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public Builder addTensor( - org.tensorflow.framework.TensorProto.Builder builderForValue) { - if (tensorBuilder_ == null) { - ensureTensorIsMutable(); - tensor_.add(builderForValue.build()); - onChanged(); - } else { - tensorBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public Builder addTensor( - int index, org.tensorflow.framework.TensorProto.Builder builderForValue) { - if (tensorBuilder_ == null) { - ensureTensorIsMutable(); - tensor_.add(index, builderForValue.build()); - onChanged(); - } else { - tensorBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public Builder addAllTensor( - java.lang.Iterable values) { - if (tensorBuilder_ == null) { - ensureTensorIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, tensor_); - onChanged(); - } else { - tensorBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public Builder clearTensor() { - if (tensorBuilder_ == null) { - tensor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - tensorBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public Builder removeTensor(int index) { - if (tensorBuilder_ == null) { - ensureTensorIsMutable(); - tensor_.remove(index); - onChanged(); - } else { - tensorBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public org.tensorflow.framework.TensorProto.Builder getTensorBuilder( - int index) { - return getTensorFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public org.tensorflow.framework.TensorProtoOrBuilder getTensorOrBuilder( - int index) { - if (tensorBuilder_ == null) { - return tensor_.get(index); } else { - return tensorBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public java.util.List - getTensorOrBuilderList() { - if (tensorBuilder_ != null) { - return tensorBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tensor_); - } - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public org.tensorflow.framework.TensorProto.Builder addTensorBuilder() { - return getTensorFieldBuilder().addBuilder( - org.tensorflow.framework.TensorProto.getDefaultInstance()); - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public org.tensorflow.framework.TensorProto.Builder addTensorBuilder( - int index) { - return getTensorFieldBuilder().addBuilder( - index, org.tensorflow.framework.TensorProto.getDefaultInstance()); - } - /** - * repeated .tensorflow.TensorProto tensor = 8; - * - *
-       * "list(tensor)"
-       * 
- */ - public java.util.List - getTensorBuilderList() { - return getTensorFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.TensorProto, org.tensorflow.framework.TensorProto.Builder, org.tensorflow.framework.TensorProtoOrBuilder> - getTensorFieldBuilder() { - if (tensorBuilder_ == null) { - tensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.TensorProto, org.tensorflow.framework.TensorProto.Builder, org.tensorflow.framework.TensorProtoOrBuilder>( - tensor_, - ((bitField0_ & 0x00000040) == 0x00000040), - getParentForChildren(), - isClean()); - tensor_ = null; - } - return tensorBuilder_; - } - 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.AttrValue.ListValue) - } - - // @@protoc_insertion_point(class_scope:tensorflow.AttrValue.ListValue) - private static final org.tensorflow.framework.AttrValue.ListValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.AttrValue.ListValue(); - } - - public static org.tensorflow.framework.AttrValue.ListValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ListValue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ListValue(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.AttrValue.ListValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int valueCase_ = 0; - private java.lang.Object value_; - public enum ValueCase - implements com.google.protobuf.Internal.EnumLite { - S(2), - I(3), - F(4), - B(5), - TYPE(6), - SHAPE(7), - TENSOR(8), - LIST(1), - FUNC(10), - PLACEHOLDER(9), - VALUE_NOT_SET(0); - private int value = 0; - private ValueCase(int value) { - this.value = value; - } - public static ValueCase valueOf(int value) { - switch (value) { - case 2: return S; - case 3: return I; - case 4: return F; - case 5: return B; - case 6: return TYPE; - case 7: return SHAPE; - case 8: return TENSOR; - case 1: return LIST; - case 10: return FUNC; - case 9: return PLACEHOLDER; - case 0: return VALUE_NOT_SET; - default: throw new java.lang.IllegalArgumentException( - "Value is undefined for this oneof enum."); - } - } - public int getNumber() { - return this.value; - } - }; - - public ValueCase - getValueCase() { - return ValueCase.valueOf( - valueCase_); - } - - public static final int S_FIELD_NUMBER = 2; - /** - * optional bytes s = 2; - * - *
-   * "string"
-   * 
- */ - public com.google.protobuf.ByteString getS() { - if (valueCase_ == 2) { - return (com.google.protobuf.ByteString) value_; - } - return com.google.protobuf.ByteString.EMPTY; - } - - public static final int I_FIELD_NUMBER = 3; - /** - * optional int64 i = 3; - * - *
-   * "int"
-   * 
- */ - public long getI() { - if (valueCase_ == 3) { - return (java.lang.Long) value_; - } - return 0L; - } - - public static final int F_FIELD_NUMBER = 4; - /** - * optional float f = 4; - * - *
-   * "float"
-   * 
- */ - public float getF() { - if (valueCase_ == 4) { - return (java.lang.Float) value_; - } - return 0F; - } - - public static final int B_FIELD_NUMBER = 5; - /** - * optional bool b = 5; - * - *
-   * "bool"
-   * 
- */ - public boolean getB() { - if (valueCase_ == 5) { - return (java.lang.Boolean) value_; - } - return false; - } - - public static final int TYPE_FIELD_NUMBER = 6; - /** - * optional .tensorflow.DataType type = 6; - * - *
-   * "type"
-   * 
- */ - public int getTypeValue() { - if (valueCase_ == 6) { - return (java.lang.Integer) value_; - } - return 0; - } - /** - * optional .tensorflow.DataType type = 6; - * - *
-   * "type"
-   * 
- */ - public org.tensorflow.framework.DataType getType() { - if (valueCase_ == 6) { - org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf((java.lang.Integer) value_); - return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result; - } - return org.tensorflow.framework.DataType.DT_INVALID; - } - - public static final int SHAPE_FIELD_NUMBER = 7; - /** - * optional .tensorflow.TensorShapeProto shape = 7; - * - *
-   * "shape"
-   * 
- */ - public org.tensorflow.framework.TensorShapeProto getShape() { - if (valueCase_ == 7) { - return (org.tensorflow.framework.TensorShapeProto) value_; - } - return org.tensorflow.framework.TensorShapeProto.getDefaultInstance(); - } - /** - * optional .tensorflow.TensorShapeProto shape = 7; - * - *
-   * "shape"
-   * 
- */ - public org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { - if (valueCase_ == 7) { - return (org.tensorflow.framework.TensorShapeProto) value_; - } - return org.tensorflow.framework.TensorShapeProto.getDefaultInstance(); - } - - public static final int TENSOR_FIELD_NUMBER = 8; - /** - * optional .tensorflow.TensorProto tensor = 8; - * - *
-   * "tensor"
-   * 
- */ - public org.tensorflow.framework.TensorProto getTensor() { - if (valueCase_ == 8) { - return (org.tensorflow.framework.TensorProto) value_; - } - return org.tensorflow.framework.TensorProto.getDefaultInstance(); - } - /** - * optional .tensorflow.TensorProto tensor = 8; - * - *
-   * "tensor"
-   * 
- */ - public org.tensorflow.framework.TensorProtoOrBuilder getTensorOrBuilder() { - if (valueCase_ == 8) { - return (org.tensorflow.framework.TensorProto) value_; - } - return org.tensorflow.framework.TensorProto.getDefaultInstance(); - } - - public static final int LIST_FIELD_NUMBER = 1; - /** - * optional .tensorflow.AttrValue.ListValue list = 1; - * - *
-   * any "list(...)"
-   * 
- */ - public org.tensorflow.framework.AttrValue.ListValue getList() { - if (valueCase_ == 1) { - return (org.tensorflow.framework.AttrValue.ListValue) value_; - } - return org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance(); - } - /** - * optional .tensorflow.AttrValue.ListValue list = 1; - * - *
-   * any "list(...)"
-   * 
- */ - public org.tensorflow.framework.AttrValue.ListValueOrBuilder getListOrBuilder() { - if (valueCase_ == 1) { - return (org.tensorflow.framework.AttrValue.ListValue) value_; - } - return org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance(); - } - - public static final int FUNC_FIELD_NUMBER = 10; - /** - * optional .tensorflow.NameAttrList func = 10; - * - *
-   * "func" represents a function. func.name is a function's name or
-   * a primitive op's name. func.attr.first is the name of an attr
-   * defined for that function. func.attr.second is the value for
-   * that attr in the instantiation.
-   * 
- */ - public org.tensorflow.framework.NameAttrList getFunc() { - if (valueCase_ == 10) { - return (org.tensorflow.framework.NameAttrList) value_; - } - return org.tensorflow.framework.NameAttrList.getDefaultInstance(); - } - /** - * optional .tensorflow.NameAttrList func = 10; - * - *
-   * "func" represents a function. func.name is a function's name or
-   * a primitive op's name. func.attr.first is the name of an attr
-   * defined for that function. func.attr.second is the value for
-   * that attr in the instantiation.
-   * 
- */ - public org.tensorflow.framework.NameAttrListOrBuilder getFuncOrBuilder() { - if (valueCase_ == 10) { - return (org.tensorflow.framework.NameAttrList) value_; - } - return org.tensorflow.framework.NameAttrList.getDefaultInstance(); - } - - public static final int PLACEHOLDER_FIELD_NUMBER = 9; - /** - * optional string placeholder = 9; - * - *
-   * This is a placeholder only used in nodes defined inside a
-   * function.  It indicates the attr value will be supplied when
-   * the function is instantiated.  For example, let us suppose a
-   * node "N" in function "FN". "N" has an attr "A" with value
-   * placeholder = "foo". When FN is instantiated with attr "foo"
-   * set to "bar", the instantiated node N's attr A will have been
-   * given the value "bar".
-   * 
- */ - public java.lang.String getPlaceholder() { - java.lang.Object ref = ""; - if (valueCase_ == 9) { - ref = value_; - } - 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 (valueCase_ == 9) { - value_ = s; - } - return s; - } - } - /** - * optional string placeholder = 9; - * - *
-   * This is a placeholder only used in nodes defined inside a
-   * function.  It indicates the attr value will be supplied when
-   * the function is instantiated.  For example, let us suppose a
-   * node "N" in function "FN". "N" has an attr "A" with value
-   * placeholder = "foo". When FN is instantiated with attr "foo"
-   * set to "bar", the instantiated node N's attr A will have been
-   * given the value "bar".
-   * 
- */ - public com.google.protobuf.ByteString - getPlaceholderBytes() { - java.lang.Object ref = ""; - if (valueCase_ == 9) { - ref = value_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valueCase_ == 9) { - value_ = 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 (valueCase_ == 1) { - output.writeMessage(1, (org.tensorflow.framework.AttrValue.ListValue) value_); - } - if (valueCase_ == 2) { - output.writeBytes( - 2, (com.google.protobuf.ByteString)((com.google.protobuf.ByteString) value_)); - } - if (valueCase_ == 3) { - output.writeInt64( - 3, (long)((java.lang.Long) value_)); - } - if (valueCase_ == 4) { - output.writeFloat( - 4, (float)((java.lang.Float) value_)); - } - if (valueCase_ == 5) { - output.writeBool( - 5, (boolean)((java.lang.Boolean) value_)); - } - if (valueCase_ == 6) { - output.writeEnum(6, ((java.lang.Integer) value_)); - } - if (valueCase_ == 7) { - output.writeMessage(7, (org.tensorflow.framework.TensorShapeProto) value_); - } - if (valueCase_ == 8) { - output.writeMessage(8, (org.tensorflow.framework.TensorProto) value_); - } - if (valueCase_ == 9) { - com.google.protobuf.GeneratedMessage.writeString(output, 9, value_); - } - if (valueCase_ == 10) { - output.writeMessage(10, (org.tensorflow.framework.NameAttrList) value_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (valueCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (org.tensorflow.framework.AttrValue.ListValue) value_); - } - if (valueCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize( - 2, (com.google.protobuf.ByteString)((com.google.protobuf.ByteString) value_)); - } - if (valueCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size( - 3, (long)((java.lang.Long) value_)); - } - if (valueCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize( - 4, (float)((java.lang.Float) value_)); - } - if (valueCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 5, (boolean)((java.lang.Boolean) value_)); - } - if (valueCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(6, ((java.lang.Integer) value_)); - } - if (valueCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, (org.tensorflow.framework.TensorShapeProto) value_); - } - if (valueCase_ == 8) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, (org.tensorflow.framework.TensorProto) value_); - } - if (valueCase_ == 9) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(9, value_); - } - if (valueCase_ == 10) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, (org.tensorflow.framework.NameAttrList) value_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.AttrValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.AttrValue 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.AttrValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.AttrValue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.AttrValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.AttrValue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.AttrValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.AttrValue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.AttrValue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.AttrValue parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.AttrValue 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.AttrValue} - * - *
-   * Protocol buffer representing the value for an attr used to configure an Op.
-   * Comment indicates the corresponding attr type.  Only the field matching the
-   * attr type may be filled.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.AttrValue) - org.tensorflow.framework.AttrValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.AttrValue.class, org.tensorflow.framework.AttrValue.Builder.class); - } - - // Construct using org.tensorflow.framework.AttrValue.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - valueCase_ = 0; - value_ = null; - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_descriptor; - } - - public org.tensorflow.framework.AttrValue getDefaultInstanceForType() { - return org.tensorflow.framework.AttrValue.getDefaultInstance(); - } - - public org.tensorflow.framework.AttrValue build() { - org.tensorflow.framework.AttrValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.AttrValue buildPartial() { - org.tensorflow.framework.AttrValue result = new org.tensorflow.framework.AttrValue(this); - if (valueCase_ == 2) { - result.value_ = value_; - } - if (valueCase_ == 3) { - result.value_ = value_; - } - if (valueCase_ == 4) { - result.value_ = value_; - } - if (valueCase_ == 5) { - result.value_ = value_; - } - if (valueCase_ == 6) { - result.value_ = value_; - } - if (valueCase_ == 7) { - if (shapeBuilder_ == null) { - result.value_ = value_; - } else { - result.value_ = shapeBuilder_.build(); - } - } - if (valueCase_ == 8) { - if (tensorBuilder_ == null) { - result.value_ = value_; - } else { - result.value_ = tensorBuilder_.build(); - } - } - if (valueCase_ == 1) { - if (listBuilder_ == null) { - result.value_ = value_; - } else { - result.value_ = listBuilder_.build(); - } - } - if (valueCase_ == 10) { - if (funcBuilder_ == null) { - result.value_ = value_; - } else { - result.value_ = funcBuilder_.build(); - } - } - if (valueCase_ == 9) { - result.value_ = value_; - } - result.valueCase_ = valueCase_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.AttrValue) { - return mergeFrom((org.tensorflow.framework.AttrValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.AttrValue other) { - if (other == org.tensorflow.framework.AttrValue.getDefaultInstance()) return this; - switch (other.getValueCase()) { - case S: { - setS(other.getS()); - break; - } - case I: { - setI(other.getI()); - break; - } - case F: { - setF(other.getF()); - break; - } - case B: { - setB(other.getB()); - break; - } - case TYPE: { - setTypeValue(other.getTypeValue()); - break; - } - case SHAPE: { - mergeShape(other.getShape()); - break; - } - case TENSOR: { - mergeTensor(other.getTensor()); - break; - } - case LIST: { - mergeList(other.getList()); - break; - } - case FUNC: { - mergeFunc(other.getFunc()); - break; - } - case PLACEHOLDER: { - valueCase_ = 9; - value_ = other.value_; - onChanged(); - break; - } - case VALUE_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.AttrValue parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.AttrValue) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int valueCase_ = 0; - private java.lang.Object value_; - public ValueCase - getValueCase() { - return ValueCase.valueOf( - valueCase_); - } - - public Builder clearValue() { - valueCase_ = 0; - value_ = null; - onChanged(); - return this; - } - - - /** - * optional bytes s = 2; - * - *
-     * "string"
-     * 
- */ - public com.google.protobuf.ByteString getS() { - if (valueCase_ == 2) { - return (com.google.protobuf.ByteString) value_; - } - return com.google.protobuf.ByteString.EMPTY; - } - /** - * optional bytes s = 2; - * - *
-     * "string"
-     * 
- */ - public Builder setS(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - valueCase_ = 2; - value_ = value; - onChanged(); - return this; - } - /** - * optional bytes s = 2; - * - *
-     * "string"
-     * 
- */ - public Builder clearS() { - if (valueCase_ == 2) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - * optional int64 i = 3; - * - *
-     * "int"
-     * 
- */ - public long getI() { - if (valueCase_ == 3) { - return (java.lang.Long) value_; - } - return 0L; - } - /** - * optional int64 i = 3; - * - *
-     * "int"
-     * 
- */ - public Builder setI(long value) { - valueCase_ = 3; - value_ = value; - onChanged(); - return this; - } - /** - * optional int64 i = 3; - * - *
-     * "int"
-     * 
- */ - public Builder clearI() { - if (valueCase_ == 3) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - * optional float f = 4; - * - *
-     * "float"
-     * 
- */ - public float getF() { - if (valueCase_ == 4) { - return (java.lang.Float) value_; - } - return 0F; - } - /** - * optional float f = 4; - * - *
-     * "float"
-     * 
- */ - public Builder setF(float value) { - valueCase_ = 4; - value_ = value; - onChanged(); - return this; - } - /** - * optional float f = 4; - * - *
-     * "float"
-     * 
- */ - public Builder clearF() { - if (valueCase_ == 4) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - * optional bool b = 5; - * - *
-     * "bool"
-     * 
- */ - public boolean getB() { - if (valueCase_ == 5) { - return (java.lang.Boolean) value_; - } - return false; - } - /** - * optional bool b = 5; - * - *
-     * "bool"
-     * 
- */ - public Builder setB(boolean value) { - valueCase_ = 5; - value_ = value; - onChanged(); - return this; - } - /** - * optional bool b = 5; - * - *
-     * "bool"
-     * 
- */ - public Builder clearB() { - if (valueCase_ == 5) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - * optional .tensorflow.DataType type = 6; - * - *
-     * "type"
-     * 
- */ - public int getTypeValue() { - if (valueCase_ == 6) { - return ((java.lang.Integer) value_).intValue(); - } - return 0; - } - /** - * optional .tensorflow.DataType type = 6; - * - *
-     * "type"
-     * 
- */ - public Builder setTypeValue(int value) { - valueCase_ = 6; - value_ = value; - onChanged(); - return this; - } - /** - * optional .tensorflow.DataType type = 6; - * - *
-     * "type"
-     * 
- */ - public org.tensorflow.framework.DataType getType() { - if (valueCase_ == 6) { - org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf((java.lang.Integer) value_); - return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result; - } - return org.tensorflow.framework.DataType.DT_INVALID; - } - /** - * optional .tensorflow.DataType type = 6; - * - *
-     * "type"
-     * 
- */ - public Builder setType(org.tensorflow.framework.DataType value) { - if (value == null) { - throw new NullPointerException(); - } - valueCase_ = 6; - value_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .tensorflow.DataType type = 6; - * - *
-     * "type"
-     * 
- */ - public Builder clearType() { - if (valueCase_ == 6) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> shapeBuilder_; - /** - * optional .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "shape"
-     * 
- */ - public org.tensorflow.framework.TensorShapeProto getShape() { - if (shapeBuilder_ == null) { - if (valueCase_ == 7) { - return (org.tensorflow.framework.TensorShapeProto) value_; - } - return org.tensorflow.framework.TensorShapeProto.getDefaultInstance(); - } else { - if (valueCase_ == 7) { - return shapeBuilder_.getMessage(); - } - return org.tensorflow.framework.TensorShapeProto.getDefaultInstance(); - } - } - /** - * optional .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "shape"
-     * 
- */ - public Builder setShape(org.tensorflow.framework.TensorShapeProto value) { - if (shapeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - value_ = value; - onChanged(); - } else { - shapeBuilder_.setMessage(value); - } - valueCase_ = 7; - return this; - } - /** - * optional .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "shape"
-     * 
- */ - public Builder setShape( - org.tensorflow.framework.TensorShapeProto.Builder builderForValue) { - if (shapeBuilder_ == null) { - value_ = builderForValue.build(); - onChanged(); - } else { - shapeBuilder_.setMessage(builderForValue.build()); - } - valueCase_ = 7; - return this; - } - /** - * optional .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "shape"
-     * 
- */ - public Builder mergeShape(org.tensorflow.framework.TensorShapeProto value) { - if (shapeBuilder_ == null) { - if (valueCase_ == 7 && - value_ != org.tensorflow.framework.TensorShapeProto.getDefaultInstance()) { - value_ = org.tensorflow.framework.TensorShapeProto.newBuilder((org.tensorflow.framework.TensorShapeProto) value_) - .mergeFrom(value).buildPartial(); - } else { - value_ = value; - } - onChanged(); - } else { - if (valueCase_ == 7) { - shapeBuilder_.mergeFrom(value); - } - shapeBuilder_.setMessage(value); - } - valueCase_ = 7; - return this; - } - /** - * optional .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "shape"
-     * 
- */ - public Builder clearShape() { - if (shapeBuilder_ == null) { - if (valueCase_ == 7) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - } else { - if (valueCase_ == 7) { - valueCase_ = 0; - value_ = null; - } - shapeBuilder_.clear(); - } - return this; - } - /** - * optional .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "shape"
-     * 
- */ - public org.tensorflow.framework.TensorShapeProto.Builder getShapeBuilder() { - return getShapeFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "shape"
-     * 
- */ - public org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { - if ((valueCase_ == 7) && (shapeBuilder_ != null)) { - return shapeBuilder_.getMessageOrBuilder(); - } else { - if (valueCase_ == 7) { - return (org.tensorflow.framework.TensorShapeProto) value_; - } - return org.tensorflow.framework.TensorShapeProto.getDefaultInstance(); - } - } - /** - * optional .tensorflow.TensorShapeProto shape = 7; - * - *
-     * "shape"
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> - getShapeFieldBuilder() { - if (shapeBuilder_ == null) { - if (!(valueCase_ == 7)) { - value_ = org.tensorflow.framework.TensorShapeProto.getDefaultInstance(); - } - shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>( - (org.tensorflow.framework.TensorShapeProto) value_, - getParentForChildren(), - isClean()); - value_ = null; - } - valueCase_ = 7; - onChanged();; - return shapeBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.TensorProto, org.tensorflow.framework.TensorProto.Builder, org.tensorflow.framework.TensorProtoOrBuilder> tensorBuilder_; - /** - * optional .tensorflow.TensorProto tensor = 8; - * - *
-     * "tensor"
-     * 
- */ - public org.tensorflow.framework.TensorProto getTensor() { - if (tensorBuilder_ == null) { - if (valueCase_ == 8) { - return (org.tensorflow.framework.TensorProto) value_; - } - return org.tensorflow.framework.TensorProto.getDefaultInstance(); - } else { - if (valueCase_ == 8) { - return tensorBuilder_.getMessage(); - } - return org.tensorflow.framework.TensorProto.getDefaultInstance(); - } - } - /** - * optional .tensorflow.TensorProto tensor = 8; - * - *
-     * "tensor"
-     * 
- */ - public Builder setTensor(org.tensorflow.framework.TensorProto value) { - if (tensorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - value_ = value; - onChanged(); - } else { - tensorBuilder_.setMessage(value); - } - valueCase_ = 8; - return this; - } - /** - * optional .tensorflow.TensorProto tensor = 8; - * - *
-     * "tensor"
-     * 
- */ - public Builder setTensor( - org.tensorflow.framework.TensorProto.Builder builderForValue) { - if (tensorBuilder_ == null) { - value_ = builderForValue.build(); - onChanged(); - } else { - tensorBuilder_.setMessage(builderForValue.build()); - } - valueCase_ = 8; - return this; - } - /** - * optional .tensorflow.TensorProto tensor = 8; - * - *
-     * "tensor"
-     * 
- */ - public Builder mergeTensor(org.tensorflow.framework.TensorProto value) { - if (tensorBuilder_ == null) { - if (valueCase_ == 8 && - value_ != org.tensorflow.framework.TensorProto.getDefaultInstance()) { - value_ = org.tensorflow.framework.TensorProto.newBuilder((org.tensorflow.framework.TensorProto) value_) - .mergeFrom(value).buildPartial(); - } else { - value_ = value; - } - onChanged(); - } else { - if (valueCase_ == 8) { - tensorBuilder_.mergeFrom(value); - } - tensorBuilder_.setMessage(value); - } - valueCase_ = 8; - return this; - } - /** - * optional .tensorflow.TensorProto tensor = 8; - * - *
-     * "tensor"
-     * 
- */ - public Builder clearTensor() { - if (tensorBuilder_ == null) { - if (valueCase_ == 8) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - } else { - if (valueCase_ == 8) { - valueCase_ = 0; - value_ = null; - } - tensorBuilder_.clear(); - } - return this; - } - /** - * optional .tensorflow.TensorProto tensor = 8; - * - *
-     * "tensor"
-     * 
- */ - public org.tensorflow.framework.TensorProto.Builder getTensorBuilder() { - return getTensorFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.TensorProto tensor = 8; - * - *
-     * "tensor"
-     * 
- */ - public org.tensorflow.framework.TensorProtoOrBuilder getTensorOrBuilder() { - if ((valueCase_ == 8) && (tensorBuilder_ != null)) { - return tensorBuilder_.getMessageOrBuilder(); - } else { - if (valueCase_ == 8) { - return (org.tensorflow.framework.TensorProto) value_; - } - return org.tensorflow.framework.TensorProto.getDefaultInstance(); - } - } - /** - * optional .tensorflow.TensorProto tensor = 8; - * - *
-     * "tensor"
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.TensorProto, org.tensorflow.framework.TensorProto.Builder, org.tensorflow.framework.TensorProtoOrBuilder> - getTensorFieldBuilder() { - if (tensorBuilder_ == null) { - if (!(valueCase_ == 8)) { - value_ = org.tensorflow.framework.TensorProto.getDefaultInstance(); - } - tensorBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.TensorProto, org.tensorflow.framework.TensorProto.Builder, org.tensorflow.framework.TensorProtoOrBuilder>( - (org.tensorflow.framework.TensorProto) value_, - getParentForChildren(), - isClean()); - value_ = null; - } - valueCase_ = 8; - onChanged();; - return tensorBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.AttrValue.ListValue, org.tensorflow.framework.AttrValue.ListValue.Builder, org.tensorflow.framework.AttrValue.ListValueOrBuilder> listBuilder_; - /** - * optional .tensorflow.AttrValue.ListValue list = 1; - * - *
-     * any "list(...)"
-     * 
- */ - public org.tensorflow.framework.AttrValue.ListValue getList() { - if (listBuilder_ == null) { - if (valueCase_ == 1) { - return (org.tensorflow.framework.AttrValue.ListValue) value_; - } - return org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance(); - } else { - if (valueCase_ == 1) { - return listBuilder_.getMessage(); - } - return org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance(); - } - } - /** - * optional .tensorflow.AttrValue.ListValue list = 1; - * - *
-     * any "list(...)"
-     * 
- */ - public Builder setList(org.tensorflow.framework.AttrValue.ListValue value) { - if (listBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - value_ = value; - onChanged(); - } else { - listBuilder_.setMessage(value); - } - valueCase_ = 1; - return this; - } - /** - * optional .tensorflow.AttrValue.ListValue list = 1; - * - *
-     * any "list(...)"
-     * 
- */ - public Builder setList( - org.tensorflow.framework.AttrValue.ListValue.Builder builderForValue) { - if (listBuilder_ == null) { - value_ = builderForValue.build(); - onChanged(); - } else { - listBuilder_.setMessage(builderForValue.build()); - } - valueCase_ = 1; - return this; - } - /** - * optional .tensorflow.AttrValue.ListValue list = 1; - * - *
-     * any "list(...)"
-     * 
- */ - public Builder mergeList(org.tensorflow.framework.AttrValue.ListValue value) { - if (listBuilder_ == null) { - if (valueCase_ == 1 && - value_ != org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance()) { - value_ = org.tensorflow.framework.AttrValue.ListValue.newBuilder((org.tensorflow.framework.AttrValue.ListValue) value_) - .mergeFrom(value).buildPartial(); - } else { - value_ = value; - } - onChanged(); - } else { - if (valueCase_ == 1) { - listBuilder_.mergeFrom(value); - } - listBuilder_.setMessage(value); - } - valueCase_ = 1; - return this; - } - /** - * optional .tensorflow.AttrValue.ListValue list = 1; - * - *
-     * any "list(...)"
-     * 
- */ - public Builder clearList() { - if (listBuilder_ == null) { - if (valueCase_ == 1) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - } else { - if (valueCase_ == 1) { - valueCase_ = 0; - value_ = null; - } - listBuilder_.clear(); - } - return this; - } - /** - * optional .tensorflow.AttrValue.ListValue list = 1; - * - *
-     * any "list(...)"
-     * 
- */ - public org.tensorflow.framework.AttrValue.ListValue.Builder getListBuilder() { - return getListFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.AttrValue.ListValue list = 1; - * - *
-     * any "list(...)"
-     * 
- */ - public org.tensorflow.framework.AttrValue.ListValueOrBuilder getListOrBuilder() { - if ((valueCase_ == 1) && (listBuilder_ != null)) { - return listBuilder_.getMessageOrBuilder(); - } else { - if (valueCase_ == 1) { - return (org.tensorflow.framework.AttrValue.ListValue) value_; - } - return org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance(); - } - } - /** - * optional .tensorflow.AttrValue.ListValue list = 1; - * - *
-     * any "list(...)"
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.AttrValue.ListValue, org.tensorflow.framework.AttrValue.ListValue.Builder, org.tensorflow.framework.AttrValue.ListValueOrBuilder> - getListFieldBuilder() { - if (listBuilder_ == null) { - if (!(valueCase_ == 1)) { - value_ = org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance(); - } - listBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.AttrValue.ListValue, org.tensorflow.framework.AttrValue.ListValue.Builder, org.tensorflow.framework.AttrValue.ListValueOrBuilder>( - (org.tensorflow.framework.AttrValue.ListValue) value_, - getParentForChildren(), - isClean()); - value_ = null; - } - valueCase_ = 1; - onChanged();; - return listBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.NameAttrList, org.tensorflow.framework.NameAttrList.Builder, org.tensorflow.framework.NameAttrListOrBuilder> funcBuilder_; - /** - * optional .tensorflow.NameAttrList func = 10; - * - *
-     * "func" represents a function. func.name is a function's name or
-     * a primitive op's name. func.attr.first is the name of an attr
-     * defined for that function. func.attr.second is the value for
-     * that attr in the instantiation.
-     * 
- */ - public org.tensorflow.framework.NameAttrList getFunc() { - if (funcBuilder_ == null) { - if (valueCase_ == 10) { - return (org.tensorflow.framework.NameAttrList) value_; - } - return org.tensorflow.framework.NameAttrList.getDefaultInstance(); - } else { - if (valueCase_ == 10) { - return funcBuilder_.getMessage(); - } - return org.tensorflow.framework.NameAttrList.getDefaultInstance(); - } - } - /** - * optional .tensorflow.NameAttrList func = 10; - * - *
-     * "func" represents a function. func.name is a function's name or
-     * a primitive op's name. func.attr.first is the name of an attr
-     * defined for that function. func.attr.second is the value for
-     * that attr in the instantiation.
-     * 
- */ - public Builder setFunc(org.tensorflow.framework.NameAttrList value) { - if (funcBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - value_ = value; - onChanged(); - } else { - funcBuilder_.setMessage(value); - } - valueCase_ = 10; - return this; - } - /** - * optional .tensorflow.NameAttrList func = 10; - * - *
-     * "func" represents a function. func.name is a function's name or
-     * a primitive op's name. func.attr.first is the name of an attr
-     * defined for that function. func.attr.second is the value for
-     * that attr in the instantiation.
-     * 
- */ - public Builder setFunc( - org.tensorflow.framework.NameAttrList.Builder builderForValue) { - if (funcBuilder_ == null) { - value_ = builderForValue.build(); - onChanged(); - } else { - funcBuilder_.setMessage(builderForValue.build()); - } - valueCase_ = 10; - return this; - } - /** - * optional .tensorflow.NameAttrList func = 10; - * - *
-     * "func" represents a function. func.name is a function's name or
-     * a primitive op's name. func.attr.first is the name of an attr
-     * defined for that function. func.attr.second is the value for
-     * that attr in the instantiation.
-     * 
- */ - public Builder mergeFunc(org.tensorflow.framework.NameAttrList value) { - if (funcBuilder_ == null) { - if (valueCase_ == 10 && - value_ != org.tensorflow.framework.NameAttrList.getDefaultInstance()) { - value_ = org.tensorflow.framework.NameAttrList.newBuilder((org.tensorflow.framework.NameAttrList) value_) - .mergeFrom(value).buildPartial(); - } else { - value_ = value; - } - onChanged(); - } else { - if (valueCase_ == 10) { - funcBuilder_.mergeFrom(value); - } - funcBuilder_.setMessage(value); - } - valueCase_ = 10; - return this; - } - /** - * optional .tensorflow.NameAttrList func = 10; - * - *
-     * "func" represents a function. func.name is a function's name or
-     * a primitive op's name. func.attr.first is the name of an attr
-     * defined for that function. func.attr.second is the value for
-     * that attr in the instantiation.
-     * 
- */ - public Builder clearFunc() { - if (funcBuilder_ == null) { - if (valueCase_ == 10) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - } else { - if (valueCase_ == 10) { - valueCase_ = 0; - value_ = null; - } - funcBuilder_.clear(); - } - return this; - } - /** - * optional .tensorflow.NameAttrList func = 10; - * - *
-     * "func" represents a function. func.name is a function's name or
-     * a primitive op's name. func.attr.first is the name of an attr
-     * defined for that function. func.attr.second is the value for
-     * that attr in the instantiation.
-     * 
- */ - public org.tensorflow.framework.NameAttrList.Builder getFuncBuilder() { - return getFuncFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.NameAttrList func = 10; - * - *
-     * "func" represents a function. func.name is a function's name or
-     * a primitive op's name. func.attr.first is the name of an attr
-     * defined for that function. func.attr.second is the value for
-     * that attr in the instantiation.
-     * 
- */ - public org.tensorflow.framework.NameAttrListOrBuilder getFuncOrBuilder() { - if ((valueCase_ == 10) && (funcBuilder_ != null)) { - return funcBuilder_.getMessageOrBuilder(); - } else { - if (valueCase_ == 10) { - return (org.tensorflow.framework.NameAttrList) value_; - } - return org.tensorflow.framework.NameAttrList.getDefaultInstance(); - } - } - /** - * optional .tensorflow.NameAttrList func = 10; - * - *
-     * "func" represents a function. func.name is a function's name or
-     * a primitive op's name. func.attr.first is the name of an attr
-     * defined for that function. func.attr.second is the value for
-     * that attr in the instantiation.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.NameAttrList, org.tensorflow.framework.NameAttrList.Builder, org.tensorflow.framework.NameAttrListOrBuilder> - getFuncFieldBuilder() { - if (funcBuilder_ == null) { - if (!(valueCase_ == 10)) { - value_ = org.tensorflow.framework.NameAttrList.getDefaultInstance(); - } - funcBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.NameAttrList, org.tensorflow.framework.NameAttrList.Builder, org.tensorflow.framework.NameAttrListOrBuilder>( - (org.tensorflow.framework.NameAttrList) value_, - getParentForChildren(), - isClean()); - value_ = null; - } - valueCase_ = 10; - onChanged();; - return funcBuilder_; - } - - /** - * optional string placeholder = 9; - * - *
-     * This is a placeholder only used in nodes defined inside a
-     * function.  It indicates the attr value will be supplied when
-     * the function is instantiated.  For example, let us suppose a
-     * node "N" in function "FN". "N" has an attr "A" with value
-     * placeholder = "foo". When FN is instantiated with attr "foo"
-     * set to "bar", the instantiated node N's attr A will have been
-     * given the value "bar".
-     * 
- */ - public java.lang.String getPlaceholder() { - java.lang.Object ref = ""; - if (valueCase_ == 9) { - ref = value_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valueCase_ == 9) { - value_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string placeholder = 9; - * - *
-     * This is a placeholder only used in nodes defined inside a
-     * function.  It indicates the attr value will be supplied when
-     * the function is instantiated.  For example, let us suppose a
-     * node "N" in function "FN". "N" has an attr "A" with value
-     * placeholder = "foo". When FN is instantiated with attr "foo"
-     * set to "bar", the instantiated node N's attr A will have been
-     * given the value "bar".
-     * 
- */ - public com.google.protobuf.ByteString - getPlaceholderBytes() { - java.lang.Object ref = ""; - if (valueCase_ == 9) { - ref = value_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valueCase_ == 9) { - value_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string placeholder = 9; - * - *
-     * This is a placeholder only used in nodes defined inside a
-     * function.  It indicates the attr value will be supplied when
-     * the function is instantiated.  For example, let us suppose a
-     * node "N" in function "FN". "N" has an attr "A" with value
-     * placeholder = "foo". When FN is instantiated with attr "foo"
-     * set to "bar", the instantiated node N's attr A will have been
-     * given the value "bar".
-     * 
- */ - public Builder setPlaceholder( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - valueCase_ = 9; - value_ = value; - onChanged(); - return this; - } - /** - * optional string placeholder = 9; - * - *
-     * This is a placeholder only used in nodes defined inside a
-     * function.  It indicates the attr value will be supplied when
-     * the function is instantiated.  For example, let us suppose a
-     * node "N" in function "FN". "N" has an attr "A" with value
-     * placeholder = "foo". When FN is instantiated with attr "foo"
-     * set to "bar", the instantiated node N's attr A will have been
-     * given the value "bar".
-     * 
- */ - public Builder clearPlaceholder() { - if (valueCase_ == 9) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - /** - * optional string placeholder = 9; - * - *
-     * This is a placeholder only used in nodes defined inside a
-     * function.  It indicates the attr value will be supplied when
-     * the function is instantiated.  For example, let us suppose a
-     * node "N" in function "FN". "N" has an attr "A" with value
-     * placeholder = "foo". When FN is instantiated with attr "foo"
-     * set to "bar", the instantiated node N's attr A will have been
-     * given the value "bar".
-     * 
- */ - public Builder setPlaceholderBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - valueCase_ = 9; - value_ = 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.AttrValue) - } - - // @@protoc_insertion_point(class_scope:tensorflow.AttrValue) - private static final org.tensorflow.framework.AttrValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.AttrValue(); - } - - public static org.tensorflow.framework.AttrValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public AttrValue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new AttrValue(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.AttrValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/AttrValueOrBuilder.java b/src/main/java/org/tensorflow/framework/AttrValueOrBuilder.java deleted file mode 100644 index 6c48db0..0000000 --- a/src/main/java/org/tensorflow/framework/AttrValueOrBuilder.java +++ /dev/null @@ -1,168 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/attr_value.proto - -package org.tensorflow.framework; - -public interface AttrValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.AttrValue) - com.google.protobuf.MessageOrBuilder { - - /** - * optional bytes s = 2; - * - *
-   * "string"
-   * 
- */ - com.google.protobuf.ByteString getS(); - - /** - * optional int64 i = 3; - * - *
-   * "int"
-   * 
- */ - long getI(); - - /** - * optional float f = 4; - * - *
-   * "float"
-   * 
- */ - float getF(); - - /** - * optional bool b = 5; - * - *
-   * "bool"
-   * 
- */ - boolean getB(); - - /** - * optional .tensorflow.DataType type = 6; - * - *
-   * "type"
-   * 
- */ - int getTypeValue(); - /** - * optional .tensorflow.DataType type = 6; - * - *
-   * "type"
-   * 
- */ - org.tensorflow.framework.DataType getType(); - - /** - * optional .tensorflow.TensorShapeProto shape = 7; - * - *
-   * "shape"
-   * 
- */ - org.tensorflow.framework.TensorShapeProto getShape(); - /** - * optional .tensorflow.TensorShapeProto shape = 7; - * - *
-   * "shape"
-   * 
- */ - org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder(); - - /** - * optional .tensorflow.TensorProto tensor = 8; - * - *
-   * "tensor"
-   * 
- */ - org.tensorflow.framework.TensorProto getTensor(); - /** - * optional .tensorflow.TensorProto tensor = 8; - * - *
-   * "tensor"
-   * 
- */ - org.tensorflow.framework.TensorProtoOrBuilder getTensorOrBuilder(); - - /** - * optional .tensorflow.AttrValue.ListValue list = 1; - * - *
-   * any "list(...)"
-   * 
- */ - org.tensorflow.framework.AttrValue.ListValue getList(); - /** - * optional .tensorflow.AttrValue.ListValue list = 1; - * - *
-   * any "list(...)"
-   * 
- */ - org.tensorflow.framework.AttrValue.ListValueOrBuilder getListOrBuilder(); - - /** - * optional .tensorflow.NameAttrList func = 10; - * - *
-   * "func" represents a function. func.name is a function's name or
-   * a primitive op's name. func.attr.first is the name of an attr
-   * defined for that function. func.attr.second is the value for
-   * that attr in the instantiation.
-   * 
- */ - org.tensorflow.framework.NameAttrList getFunc(); - /** - * optional .tensorflow.NameAttrList func = 10; - * - *
-   * "func" represents a function. func.name is a function's name or
-   * a primitive op's name. func.attr.first is the name of an attr
-   * defined for that function. func.attr.second is the value for
-   * that attr in the instantiation.
-   * 
- */ - org.tensorflow.framework.NameAttrListOrBuilder getFuncOrBuilder(); - - /** - * optional string placeholder = 9; - * - *
-   * This is a placeholder only used in nodes defined inside a
-   * function.  It indicates the attr value will be supplied when
-   * the function is instantiated.  For example, let us suppose a
-   * node "N" in function "FN". "N" has an attr "A" with value
-   * placeholder = "foo". When FN is instantiated with attr "foo"
-   * set to "bar", the instantiated node N's attr A will have been
-   * given the value "bar".
-   * 
- */ - java.lang.String getPlaceholder(); - /** - * optional string placeholder = 9; - * - *
-   * This is a placeholder only used in nodes defined inside a
-   * function.  It indicates the attr value will be supplied when
-   * the function is instantiated.  For example, let us suppose a
-   * node "N" in function "FN". "N" has an attr "A" with value
-   * placeholder = "foo". When FN is instantiated with attr "foo"
-   * set to "bar", the instantiated node N's attr A will have been
-   * given the value "bar".
-   * 
- */ - com.google.protobuf.ByteString - getPlaceholderBytes(); - - public org.tensorflow.framework.AttrValue.ValueCase getValueCase(); -} diff --git a/src/main/java/org/tensorflow/framework/AttrValueProtos.java b/src/main/java/org/tensorflow/framework/AttrValueProtos.java deleted file mode 100644 index ad014fe..0000000 --- a/src/main/java/org/tensorflow/framework/AttrValueProtos.java +++ /dev/null @@ -1,109 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/attr_value.proto - -package org.tensorflow.framework; - -public final class AttrValueProtos { - private AttrValueProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_AttrValue_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_AttrValue_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_AttrValue_ListValue_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_AttrValue_ListValue_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_NameAttrList_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_NameAttrList_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_NameAttrList_AttrEntry_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_NameAttrList_AttrEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n*tensorflow/core/framework/attr_value.p" + - "roto\022\ntensorflow\032&tensorflow/core/framew" + - "ork/tensor.proto\032,tensorflow/core/framew" + - "ork/tensor_shape.proto\032%tensorflow/core/" + - "framework/types.proto\"\376\003\n\tAttrValue\022\013\n\001s" + - "\030\002 \001(\014H\000\022\013\n\001i\030\003 \001(\003H\000\022\013\n\001f\030\004 \001(\002H\000\022\013\n\001b\030" + - "\005 \001(\010H\000\022$\n\004type\030\006 \001(\0162\024.tensorflow.DataT" + - "ypeH\000\022-\n\005shape\030\007 \001(\0132\034.tensorflow.Tensor" + - "ShapeProtoH\000\022)\n\006tensor\030\010 \001(\0132\027.tensorflo" + - "w.TensorProtoH\000\022/\n\004list\030\001 \001(\0132\037.tensorfl", - "ow.AttrValue.ListValueH\000\022(\n\004func\030\n \001(\0132\030" + - ".tensorflow.NameAttrListH\000\022\025\n\013placeholde" + - "r\030\t \001(\tH\000\032\301\001\n\tListValue\022\t\n\001s\030\002 \003(\014\022\r\n\001i\030" + - "\003 \003(\003B\002\020\001\022\r\n\001f\030\004 \003(\002B\002\020\001\022\r\n\001b\030\005 \003(\010B\002\020\001\022" + - "&\n\004type\030\006 \003(\0162\024.tensorflow.DataTypeB\002\020\001\022" + - "+\n\005shape\030\007 \003(\0132\034.tensorflow.TensorShapeP" + - "roto\022\'\n\006tensor\030\010 \003(\0132\027.tensorflow.Tensor" + - "ProtoB\007\n\005value\"\222\001\n\014NameAttrList\022\014\n\004name\030" + - "\001 \001(\t\0220\n\004attr\030\002 \003(\0132\".tensorflow.NameAtt" + - "rList.AttrEntry\032B\n\tAttrEntry\022\013\n\003key\030\001 \001(", - "\t\022$\n\005value\030\002 \001(\0132\025.tensorflow.AttrValue:" + - "\0028\001B-\n\030org.tensorflow.frameworkB\017AttrVal" + - "ueProtosP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - org.tensorflow.framework.TensorProtos.getDescriptor(), - org.tensorflow.framework.TensorShapeProtos.getDescriptor(), - org.tensorflow.framework.TypesProtos.getDescriptor(), - }, assigner); - internal_static_tensorflow_AttrValue_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_tensorflow_AttrValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_AttrValue_descriptor, - new java.lang.String[] { "S", "I", "F", "B", "Type", "Shape", "Tensor", "List", "Func", "Placeholder", "Value", }); - internal_static_tensorflow_AttrValue_ListValue_descriptor = - internal_static_tensorflow_AttrValue_descriptor.getNestedTypes().get(0); - internal_static_tensorflow_AttrValue_ListValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_AttrValue_ListValue_descriptor, - new java.lang.String[] { "S", "I", "F", "B", "Type", "Shape", "Tensor", }); - internal_static_tensorflow_NameAttrList_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_tensorflow_NameAttrList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_NameAttrList_descriptor, - new java.lang.String[] { "Name", "Attr", }); - internal_static_tensorflow_NameAttrList_AttrEntry_descriptor = - internal_static_tensorflow_NameAttrList_descriptor.getNestedTypes().get(0); - internal_static_tensorflow_NameAttrList_AttrEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_NameAttrList_AttrEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - org.tensorflow.framework.TensorProtos.getDescriptor(); - org.tensorflow.framework.TensorShapeProtos.getDescriptor(); - org.tensorflow.framework.TypesProtos.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/org/tensorflow/framework/BusAdjacency.java b/src/main/java/org/tensorflow/framework/BusAdjacency.java deleted file mode 100644 index d102bf7..0000000 --- a/src/main/java/org/tensorflow/framework/BusAdjacency.java +++ /dev/null @@ -1,123 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/device_attributes.proto - -package org.tensorflow.framework; - -/** - * Protobuf enum {@code tensorflow.BusAdjacency} - * - *
- * BusAdjacency identifies the ability of a device to participate in
- * maximally efficient DMA operations within the local context of a
- * process.
- * This is currently ignored.
- * 
- */ -public enum BusAdjacency - implements com.google.protobuf.ProtocolMessageEnum { - /** - * BUS_0 = 0; - */ - BUS_0(0, 0), - /** - * BUS_1 = 1; - */ - BUS_1(1, 1), - /** - * BUS_ANY = 2; - */ - BUS_ANY(2, 2), - /** - * BUS_NUM_ADJACENCIES = 3; - */ - BUS_NUM_ADJACENCIES(3, 3), - UNRECOGNIZED(-1, -1), - ; - - /** - * BUS_0 = 0; - */ - public static final int BUS_0_VALUE = 0; - /** - * BUS_1 = 1; - */ - public static final int BUS_1_VALUE = 1; - /** - * BUS_ANY = 2; - */ - public static final int BUS_ANY_VALUE = 2; - /** - * BUS_NUM_ADJACENCIES = 3; - */ - public static final int BUS_NUM_ADJACENCIES_VALUE = 3; - - - public final int getNumber() { - if (index == -1) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - public static BusAdjacency valueOf(int value) { - switch (value) { - case 0: return BUS_0; - case 1: return BUS_1; - case 2: return BUS_ANY; - case 3: return BUS_NUM_ADJACENCIES; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BusAdjacency> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BusAdjacency findValueByNumber(int number) { - return BusAdjacency.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return org.tensorflow.framework.DeviceAttributesProtos.getDescriptor() - .getEnumTypes().get(0); - } - - private static final BusAdjacency[] VALUES = values(); - - public static BusAdjacency valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private BusAdjacency(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:tensorflow.BusAdjacency) -} - diff --git a/src/main/java/org/tensorflow/framework/ConfigProto.java b/src/main/java/org/tensorflow/framework/ConfigProto.java deleted file mode 100644 index 3810f43..0000000 --- a/src/main/java/org/tensorflow/framework/ConfigProto.java +++ /dev/null @@ -1,1673 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/config.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.ConfigProto} - * - *
- * Session configuration parameters.
- * The system picks an appropriate values for fields that are not set.
- * 
- */ -public final class ConfigProto extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.ConfigProto) - ConfigProtoOrBuilder { - // Use ConfigProto.newBuilder() to construct. - private ConfigProto(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ConfigProto() { - intraOpParallelismThreads_ = 0; - interOpParallelismThreads_ = 0; - usePerSessionThreads_ = false; - placementPeriod_ = 0; - deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY; - allowSoftPlacement_ = false; - logDevicePlacement_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ConfigProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - deviceCount_ = com.google.protobuf.MapField.newMapField( - DeviceCountDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - deviceCount = input.readMessage( - DeviceCountDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - deviceCount_.getMutableMap().put(deviceCount.getKey(), deviceCount.getValue()); - break; - } - case 16: { - - intraOpParallelismThreads_ = input.readInt32(); - break; - } - case 24: { - - placementPeriod_ = input.readInt32(); - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - deviceFilters_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - deviceFilters_.add(s); - break; - } - case 40: { - - interOpParallelismThreads_ = input.readInt32(); - break; - } - case 50: { - org.tensorflow.framework.GPUOptions.Builder subBuilder = null; - if (gpuOptions_ != null) { - subBuilder = gpuOptions_.toBuilder(); - } - gpuOptions_ = input.readMessage(org.tensorflow.framework.GPUOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gpuOptions_); - gpuOptions_ = subBuilder.buildPartial(); - } - - break; - } - case 56: { - - allowSoftPlacement_ = input.readBool(); - break; - } - case 64: { - - logDevicePlacement_ = input.readBool(); - break; - } - case 72: { - - usePerSessionThreads_ = input.readBool(); - break; - } - case 82: { - org.tensorflow.framework.GraphOptions.Builder subBuilder = null; - if (graphOptions_ != null) { - subBuilder = graphOptions_.toBuilder(); - } - graphOptions_ = input.readMessage(org.tensorflow.framework.GraphOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(graphOptions_); - graphOptions_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - deviceFilters_ = deviceFilters_.getUnmodifiableView(); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 1: - return internalGetDeviceCount(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.ConfigProto.class, org.tensorflow.framework.ConfigProto.Builder.class); - } - - private int bitField0_; - public static final int DEVICE_COUNT_FIELD_NUMBER = 1; - private static final class DeviceCountDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.Integer> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_DeviceCountEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.Integer> deviceCount_; - private com.google.protobuf.MapField - internalGetDeviceCount() { - if (deviceCount_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DeviceCountDefaultEntryHolder.defaultEntry); - } - return deviceCount_; - } - /** - * map<string, int32> device_count = 1; - * - *
-   * Map from device type name (e.g., "CPU" or "GPU" ) to maximum
-   * number of devices of that type to use.  If a particular device
-   * type is not found in the map, the system picks an appropriate
-   * number.
-   * 
- */ - - public java.util.Map getDeviceCount() { - return internalGetDeviceCount().getMap(); - } - - public static final int INTRA_OP_PARALLELISM_THREADS_FIELD_NUMBER = 2; - private int intraOpParallelismThreads_; - /** - * optional int32 intra_op_parallelism_threads = 2; - * - *
-   * The execution of an individual op (for some op types) can be
-   * parallelized on a pool of intra_op_parallelism_threads.
-   * 0 means the system picks an appropriate number.
-   * 
- */ - public int getIntraOpParallelismThreads() { - return intraOpParallelismThreads_; - } - - public static final int INTER_OP_PARALLELISM_THREADS_FIELD_NUMBER = 5; - private int interOpParallelismThreads_; - /** - * optional int32 inter_op_parallelism_threads = 5; - * - *
-   * Nodes that perform blocking operations are enqueued on a pool of
-   * inter_op_parallelism_threads available in each process.
-   * 0 means the system picks an appropriate number.
-   * Note that the first Session created in the process sets the
-   * number of threads for all future sessions unless use_per_session_threads is
-   * true.
-   * 
- */ - public int getInterOpParallelismThreads() { - return interOpParallelismThreads_; - } - - public static final int USE_PER_SESSION_THREADS_FIELD_NUMBER = 9; - private boolean usePerSessionThreads_; - /** - * optional bool use_per_session_threads = 9; - * - *
-   * If true, use a new set of threads for this session rather than the global
-   * pool of threads. Only supported by direct sessions.
-   * If false, use the global threads created by the first session.
-   * 
- */ - public boolean getUsePerSessionThreads() { - return usePerSessionThreads_; - } - - public static final int PLACEMENT_PERIOD_FIELD_NUMBER = 3; - private int placementPeriod_; - /** - * optional int32 placement_period = 3; - * - *
-   * Assignment of Nodes to Devices is recomputed every placement_period
-   * steps until the system warms up (at which point the recomputation
-   * typically slows down automatically).
-   * 
- */ - public int getPlacementPeriod() { - return placementPeriod_; - } - - public static final int DEVICE_FILTERS_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList deviceFilters_; - /** - * repeated string device_filters = 4; - * - *
-   * When any filters are present sessions will ignore all devices which do not
-   * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-   * "/job:worker/replica:3", etc.
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getDeviceFiltersList() { - return deviceFilters_; - } - /** - * repeated string device_filters = 4; - * - *
-   * When any filters are present sessions will ignore all devices which do not
-   * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-   * "/job:worker/replica:3", etc.
-   * 
- */ - public int getDeviceFiltersCount() { - return deviceFilters_.size(); - } - /** - * repeated string device_filters = 4; - * - *
-   * When any filters are present sessions will ignore all devices which do not
-   * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-   * "/job:worker/replica:3", etc.
-   * 
- */ - public java.lang.String getDeviceFilters(int index) { - return deviceFilters_.get(index); - } - /** - * repeated string device_filters = 4; - * - *
-   * When any filters are present sessions will ignore all devices which do not
-   * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-   * "/job:worker/replica:3", etc.
-   * 
- */ - public com.google.protobuf.ByteString - getDeviceFiltersBytes(int index) { - return deviceFilters_.getByteString(index); - } - - public static final int GPU_OPTIONS_FIELD_NUMBER = 6; - private org.tensorflow.framework.GPUOptions gpuOptions_; - /** - * optional .tensorflow.GPUOptions gpu_options = 6; - * - *
-   * Options that apply to all GPUs.
-   * 
- */ - public boolean hasGpuOptions() { - return gpuOptions_ != null; - } - /** - * optional .tensorflow.GPUOptions gpu_options = 6; - * - *
-   * Options that apply to all GPUs.
-   * 
- */ - public org.tensorflow.framework.GPUOptions getGpuOptions() { - return gpuOptions_ == null ? org.tensorflow.framework.GPUOptions.getDefaultInstance() : gpuOptions_; - } - /** - * optional .tensorflow.GPUOptions gpu_options = 6; - * - *
-   * Options that apply to all GPUs.
-   * 
- */ - public org.tensorflow.framework.GPUOptionsOrBuilder getGpuOptionsOrBuilder() { - return getGpuOptions(); - } - - public static final int ALLOW_SOFT_PLACEMENT_FIELD_NUMBER = 7; - private boolean allowSoftPlacement_; - /** - * optional bool allow_soft_placement = 7; - * - *
-   * Whether soft placement is allowed. If allow_soft_placement is true,
-   * an op will be placed on CPU if
-   *   1. there's no GPU implementation for the OP
-   * or
-   *   2. no GPU devices are known or registered
-   * or
-   *   3. need to co-locate with reftype input(s) which are from CPU.
-   * 
- */ - public boolean getAllowSoftPlacement() { - return allowSoftPlacement_; - } - - public static final int LOG_DEVICE_PLACEMENT_FIELD_NUMBER = 8; - private boolean logDevicePlacement_; - /** - * optional bool log_device_placement = 8; - * - *
-   * Whether device placements should be logged.
-   * 
- */ - public boolean getLogDevicePlacement() { - return logDevicePlacement_; - } - - public static final int GRAPH_OPTIONS_FIELD_NUMBER = 10; - private org.tensorflow.framework.GraphOptions graphOptions_; - /** - * optional .tensorflow.GraphOptions graph_options = 10; - * - *
-   * Options that apply to all graphs.
-   * 
- */ - public boolean hasGraphOptions() { - return graphOptions_ != null; - } - /** - * optional .tensorflow.GraphOptions graph_options = 10; - * - *
-   * Options that apply to all graphs.
-   * 
- */ - public org.tensorflow.framework.GraphOptions getGraphOptions() { - return graphOptions_ == null ? org.tensorflow.framework.GraphOptions.getDefaultInstance() : graphOptions_; - } - /** - * optional .tensorflow.GraphOptions graph_options = 10; - * - *
-   * Options that apply to all graphs.
-   * 
- */ - public org.tensorflow.framework.GraphOptionsOrBuilder getGraphOptionsOrBuilder() { - return getGraphOptions(); - } - - 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 { - for (java.util.Map.Entry entry - : internalGetDeviceCount().getMap().entrySet()) { - com.google.protobuf.MapEntry - deviceCount = DeviceCountDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - output.writeMessage(1, deviceCount); - } - if (intraOpParallelismThreads_ != 0) { - output.writeInt32(2, intraOpParallelismThreads_); - } - if (placementPeriod_ != 0) { - output.writeInt32(3, placementPeriod_); - } - for (int i = 0; i < deviceFilters_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, deviceFilters_.getRaw(i)); - } - if (interOpParallelismThreads_ != 0) { - output.writeInt32(5, interOpParallelismThreads_); - } - if (gpuOptions_ != null) { - output.writeMessage(6, getGpuOptions()); - } - if (allowSoftPlacement_ != false) { - output.writeBool(7, allowSoftPlacement_); - } - if (logDevicePlacement_ != false) { - output.writeBool(8, logDevicePlacement_); - } - if (usePerSessionThreads_ != false) { - output.writeBool(9, usePerSessionThreads_); - } - if (graphOptions_ != null) { - output.writeMessage(10, getGraphOptions()); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetDeviceCount().getMap().entrySet()) { - com.google.protobuf.MapEntry - deviceCount = DeviceCountDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, deviceCount); - } - if (intraOpParallelismThreads_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, intraOpParallelismThreads_); - } - if (placementPeriod_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, placementPeriod_); - } - { - int dataSize = 0; - for (int i = 0; i < deviceFilters_.size(); i++) { - dataSize += computeStringSizeNoTag(deviceFilters_.getRaw(i)); - } - size += dataSize; - size += 1 * getDeviceFiltersList().size(); - } - if (interOpParallelismThreads_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(5, interOpParallelismThreads_); - } - if (gpuOptions_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getGpuOptions()); - } - if (allowSoftPlacement_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(7, allowSoftPlacement_); - } - if (logDevicePlacement_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(8, logDevicePlacement_); - } - if (usePerSessionThreads_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(9, usePerSessionThreads_); - } - if (graphOptions_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getGraphOptions()); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.ConfigProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.ConfigProto 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.ConfigProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.ConfigProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.ConfigProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.ConfigProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.ConfigProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.ConfigProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.ConfigProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.ConfigProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.ConfigProto 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.ConfigProto} - * - *
-   * Session configuration parameters.
-   * The system picks an appropriate values for fields that are not set.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.ConfigProto) - org.tensorflow.framework.ConfigProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 1: - return internalGetDeviceCount(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 1: - return internalGetMutableDeviceCount(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.ConfigProto.class, org.tensorflow.framework.ConfigProto.Builder.class); - } - - // Construct using org.tensorflow.framework.ConfigProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - internalGetMutableDeviceCount().clear(); - intraOpParallelismThreads_ = 0; - - interOpParallelismThreads_ = 0; - - usePerSessionThreads_ = false; - - placementPeriod_ = 0; - - deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000020); - if (gpuOptionsBuilder_ == null) { - gpuOptions_ = null; - } else { - gpuOptions_ = null; - gpuOptionsBuilder_ = null; - } - allowSoftPlacement_ = false; - - logDevicePlacement_ = false; - - if (graphOptionsBuilder_ == null) { - graphOptions_ = null; - } else { - graphOptions_ = null; - graphOptionsBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_descriptor; - } - - public org.tensorflow.framework.ConfigProto getDefaultInstanceForType() { - return org.tensorflow.framework.ConfigProto.getDefaultInstance(); - } - - public org.tensorflow.framework.ConfigProto build() { - org.tensorflow.framework.ConfigProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.ConfigProto buildPartial() { - org.tensorflow.framework.ConfigProto result = new org.tensorflow.framework.ConfigProto(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.deviceCount_ = internalGetDeviceCount(); - result.deviceCount_.makeImmutable(); - result.intraOpParallelismThreads_ = intraOpParallelismThreads_; - result.interOpParallelismThreads_ = interOpParallelismThreads_; - result.usePerSessionThreads_ = usePerSessionThreads_; - result.placementPeriod_ = placementPeriod_; - if (((bitField0_ & 0x00000020) == 0x00000020)) { - deviceFilters_ = deviceFilters_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.deviceFilters_ = deviceFilters_; - if (gpuOptionsBuilder_ == null) { - result.gpuOptions_ = gpuOptions_; - } else { - result.gpuOptions_ = gpuOptionsBuilder_.build(); - } - result.allowSoftPlacement_ = allowSoftPlacement_; - result.logDevicePlacement_ = logDevicePlacement_; - if (graphOptionsBuilder_ == null) { - result.graphOptions_ = graphOptions_; - } else { - result.graphOptions_ = graphOptionsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.ConfigProto) { - return mergeFrom((org.tensorflow.framework.ConfigProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.ConfigProto other) { - if (other == org.tensorflow.framework.ConfigProto.getDefaultInstance()) return this; - internalGetMutableDeviceCount().mergeFrom( - other.internalGetDeviceCount()); - if (other.getIntraOpParallelismThreads() != 0) { - setIntraOpParallelismThreads(other.getIntraOpParallelismThreads()); - } - if (other.getInterOpParallelismThreads() != 0) { - setInterOpParallelismThreads(other.getInterOpParallelismThreads()); - } - if (other.getUsePerSessionThreads() != false) { - setUsePerSessionThreads(other.getUsePerSessionThreads()); - } - if (other.getPlacementPeriod() != 0) { - setPlacementPeriod(other.getPlacementPeriod()); - } - if (!other.deviceFilters_.isEmpty()) { - if (deviceFilters_.isEmpty()) { - deviceFilters_ = other.deviceFilters_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureDeviceFiltersIsMutable(); - deviceFilters_.addAll(other.deviceFilters_); - } - onChanged(); - } - if (other.hasGpuOptions()) { - mergeGpuOptions(other.getGpuOptions()); - } - if (other.getAllowSoftPlacement() != false) { - setAllowSoftPlacement(other.getAllowSoftPlacement()); - } - if (other.getLogDevicePlacement() != false) { - setLogDevicePlacement(other.getLogDevicePlacement()); - } - if (other.hasGraphOptions()) { - mergeGraphOptions(other.getGraphOptions()); - } - 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.ConfigProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.ConfigProto) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.MapField< - java.lang.String, java.lang.Integer> deviceCount_; - private com.google.protobuf.MapField - internalGetDeviceCount() { - if (deviceCount_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DeviceCountDefaultEntryHolder.defaultEntry); - } - return deviceCount_; - } - private com.google.protobuf.MapField - internalGetMutableDeviceCount() { - onChanged();; - if (deviceCount_ == null) { - deviceCount_ = com.google.protobuf.MapField.newMapField( - DeviceCountDefaultEntryHolder.defaultEntry); - } - if (!deviceCount_.isMutable()) { - deviceCount_ = deviceCount_.copy(); - } - return deviceCount_; - } - /** - * map<string, int32> device_count = 1; - * - *
-     * Map from device type name (e.g., "CPU" or "GPU" ) to maximum
-     * number of devices of that type to use.  If a particular device
-     * type is not found in the map, the system picks an appropriate
-     * number.
-     * 
- */ - public java.util.Map getDeviceCount() { - return internalGetDeviceCount().getMap(); - } - /** - * map<string, int32> device_count = 1; - * - *
-     * Map from device type name (e.g., "CPU" or "GPU" ) to maximum
-     * number of devices of that type to use.  If a particular device
-     * type is not found in the map, the system picks an appropriate
-     * number.
-     * 
- */ - public java.util.Map - getMutableDeviceCount() { - return internalGetMutableDeviceCount().getMutableMap(); - } - /** - * map<string, int32> device_count = 1; - * - *
-     * Map from device type name (e.g., "CPU" or "GPU" ) to maximum
-     * number of devices of that type to use.  If a particular device
-     * type is not found in the map, the system picks an appropriate
-     * number.
-     * 
- */ - public Builder putAllDeviceCount( - java.util.Map values) { - getMutableDeviceCount().putAll(values); - return this; - } - - private int intraOpParallelismThreads_ ; - /** - * optional int32 intra_op_parallelism_threads = 2; - * - *
-     * The execution of an individual op (for some op types) can be
-     * parallelized on a pool of intra_op_parallelism_threads.
-     * 0 means the system picks an appropriate number.
-     * 
- */ - public int getIntraOpParallelismThreads() { - return intraOpParallelismThreads_; - } - /** - * optional int32 intra_op_parallelism_threads = 2; - * - *
-     * The execution of an individual op (for some op types) can be
-     * parallelized on a pool of intra_op_parallelism_threads.
-     * 0 means the system picks an appropriate number.
-     * 
- */ - public Builder setIntraOpParallelismThreads(int value) { - - intraOpParallelismThreads_ = value; - onChanged(); - return this; - } - /** - * optional int32 intra_op_parallelism_threads = 2; - * - *
-     * The execution of an individual op (for some op types) can be
-     * parallelized on a pool of intra_op_parallelism_threads.
-     * 0 means the system picks an appropriate number.
-     * 
- */ - public Builder clearIntraOpParallelismThreads() { - - intraOpParallelismThreads_ = 0; - onChanged(); - return this; - } - - private int interOpParallelismThreads_ ; - /** - * optional int32 inter_op_parallelism_threads = 5; - * - *
-     * Nodes that perform blocking operations are enqueued on a pool of
-     * inter_op_parallelism_threads available in each process.
-     * 0 means the system picks an appropriate number.
-     * Note that the first Session created in the process sets the
-     * number of threads for all future sessions unless use_per_session_threads is
-     * true.
-     * 
- */ - public int getInterOpParallelismThreads() { - return interOpParallelismThreads_; - } - /** - * optional int32 inter_op_parallelism_threads = 5; - * - *
-     * Nodes that perform blocking operations are enqueued on a pool of
-     * inter_op_parallelism_threads available in each process.
-     * 0 means the system picks an appropriate number.
-     * Note that the first Session created in the process sets the
-     * number of threads for all future sessions unless use_per_session_threads is
-     * true.
-     * 
- */ - public Builder setInterOpParallelismThreads(int value) { - - interOpParallelismThreads_ = value; - onChanged(); - return this; - } - /** - * optional int32 inter_op_parallelism_threads = 5; - * - *
-     * Nodes that perform blocking operations are enqueued on a pool of
-     * inter_op_parallelism_threads available in each process.
-     * 0 means the system picks an appropriate number.
-     * Note that the first Session created in the process sets the
-     * number of threads for all future sessions unless use_per_session_threads is
-     * true.
-     * 
- */ - public Builder clearInterOpParallelismThreads() { - - interOpParallelismThreads_ = 0; - onChanged(); - return this; - } - - private boolean usePerSessionThreads_ ; - /** - * optional bool use_per_session_threads = 9; - * - *
-     * If true, use a new set of threads for this session rather than the global
-     * pool of threads. Only supported by direct sessions.
-     * If false, use the global threads created by the first session.
-     * 
- */ - public boolean getUsePerSessionThreads() { - return usePerSessionThreads_; - } - /** - * optional bool use_per_session_threads = 9; - * - *
-     * If true, use a new set of threads for this session rather than the global
-     * pool of threads. Only supported by direct sessions.
-     * If false, use the global threads created by the first session.
-     * 
- */ - public Builder setUsePerSessionThreads(boolean value) { - - usePerSessionThreads_ = value; - onChanged(); - return this; - } - /** - * optional bool use_per_session_threads = 9; - * - *
-     * If true, use a new set of threads for this session rather than the global
-     * pool of threads. Only supported by direct sessions.
-     * If false, use the global threads created by the first session.
-     * 
- */ - public Builder clearUsePerSessionThreads() { - - usePerSessionThreads_ = false; - onChanged(); - return this; - } - - private int placementPeriod_ ; - /** - * optional int32 placement_period = 3; - * - *
-     * Assignment of Nodes to Devices is recomputed every placement_period
-     * steps until the system warms up (at which point the recomputation
-     * typically slows down automatically).
-     * 
- */ - public int getPlacementPeriod() { - return placementPeriod_; - } - /** - * optional int32 placement_period = 3; - * - *
-     * Assignment of Nodes to Devices is recomputed every placement_period
-     * steps until the system warms up (at which point the recomputation
-     * typically slows down automatically).
-     * 
- */ - public Builder setPlacementPeriod(int value) { - - placementPeriod_ = value; - onChanged(); - return this; - } - /** - * optional int32 placement_period = 3; - * - *
-     * Assignment of Nodes to Devices is recomputed every placement_period
-     * steps until the system warms up (at which point the recomputation
-     * typically slows down automatically).
-     * 
- */ - public Builder clearPlacementPeriod() { - - placementPeriod_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureDeviceFiltersIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - deviceFilters_ = new com.google.protobuf.LazyStringArrayList(deviceFilters_); - bitField0_ |= 0x00000020; - } - } - /** - * repeated string device_filters = 4; - * - *
-     * When any filters are present sessions will ignore all devices which do not
-     * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-     * "/job:worker/replica:3", etc.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getDeviceFiltersList() { - return deviceFilters_.getUnmodifiableView(); - } - /** - * repeated string device_filters = 4; - * - *
-     * When any filters are present sessions will ignore all devices which do not
-     * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-     * "/job:worker/replica:3", etc.
-     * 
- */ - public int getDeviceFiltersCount() { - return deviceFilters_.size(); - } - /** - * repeated string device_filters = 4; - * - *
-     * When any filters are present sessions will ignore all devices which do not
-     * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-     * "/job:worker/replica:3", etc.
-     * 
- */ - public java.lang.String getDeviceFilters(int index) { - return deviceFilters_.get(index); - } - /** - * repeated string device_filters = 4; - * - *
-     * When any filters are present sessions will ignore all devices which do not
-     * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-     * "/job:worker/replica:3", etc.
-     * 
- */ - public com.google.protobuf.ByteString - getDeviceFiltersBytes(int index) { - return deviceFilters_.getByteString(index); - } - /** - * repeated string device_filters = 4; - * - *
-     * When any filters are present sessions will ignore all devices which do not
-     * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-     * "/job:worker/replica:3", etc.
-     * 
- */ - public Builder setDeviceFilters( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceFiltersIsMutable(); - deviceFilters_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string device_filters = 4; - * - *
-     * When any filters are present sessions will ignore all devices which do not
-     * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-     * "/job:worker/replica:3", etc.
-     * 
- */ - public Builder addDeviceFilters( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceFiltersIsMutable(); - deviceFilters_.add(value); - onChanged(); - return this; - } - /** - * repeated string device_filters = 4; - * - *
-     * When any filters are present sessions will ignore all devices which do not
-     * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-     * "/job:worker/replica:3", etc.
-     * 
- */ - public Builder addAllDeviceFilters( - java.lang.Iterable values) { - ensureDeviceFiltersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, deviceFilters_); - onChanged(); - return this; - } - /** - * repeated string device_filters = 4; - * - *
-     * When any filters are present sessions will ignore all devices which do not
-     * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-     * "/job:worker/replica:3", etc.
-     * 
- */ - public Builder clearDeviceFilters() { - deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - * repeated string device_filters = 4; - * - *
-     * When any filters are present sessions will ignore all devices which do not
-     * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-     * "/job:worker/replica:3", etc.
-     * 
- */ - public Builder addDeviceFiltersBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureDeviceFiltersIsMutable(); - deviceFilters_.add(value); - onChanged(); - return this; - } - - private org.tensorflow.framework.GPUOptions gpuOptions_ = null; - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.GPUOptions, org.tensorflow.framework.GPUOptions.Builder, org.tensorflow.framework.GPUOptionsOrBuilder> gpuOptionsBuilder_; - /** - * optional .tensorflow.GPUOptions gpu_options = 6; - * - *
-     * Options that apply to all GPUs.
-     * 
- */ - public boolean hasGpuOptions() { - return gpuOptionsBuilder_ != null || gpuOptions_ != null; - } - /** - * optional .tensorflow.GPUOptions gpu_options = 6; - * - *
-     * Options that apply to all GPUs.
-     * 
- */ - public org.tensorflow.framework.GPUOptions getGpuOptions() { - if (gpuOptionsBuilder_ == null) { - return gpuOptions_ == null ? org.tensorflow.framework.GPUOptions.getDefaultInstance() : gpuOptions_; - } else { - return gpuOptionsBuilder_.getMessage(); - } - } - /** - * optional .tensorflow.GPUOptions gpu_options = 6; - * - *
-     * Options that apply to all GPUs.
-     * 
- */ - public Builder setGpuOptions(org.tensorflow.framework.GPUOptions value) { - if (gpuOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gpuOptions_ = value; - onChanged(); - } else { - gpuOptionsBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .tensorflow.GPUOptions gpu_options = 6; - * - *
-     * Options that apply to all GPUs.
-     * 
- */ - public Builder setGpuOptions( - org.tensorflow.framework.GPUOptions.Builder builderForValue) { - if (gpuOptionsBuilder_ == null) { - gpuOptions_ = builderForValue.build(); - onChanged(); - } else { - gpuOptionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .tensorflow.GPUOptions gpu_options = 6; - * - *
-     * Options that apply to all GPUs.
-     * 
- */ - public Builder mergeGpuOptions(org.tensorflow.framework.GPUOptions value) { - if (gpuOptionsBuilder_ == null) { - if (gpuOptions_ != null) { - gpuOptions_ = - org.tensorflow.framework.GPUOptions.newBuilder(gpuOptions_).mergeFrom(value).buildPartial(); - } else { - gpuOptions_ = value; - } - onChanged(); - } else { - gpuOptionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .tensorflow.GPUOptions gpu_options = 6; - * - *
-     * Options that apply to all GPUs.
-     * 
- */ - public Builder clearGpuOptions() { - if (gpuOptionsBuilder_ == null) { - gpuOptions_ = null; - onChanged(); - } else { - gpuOptions_ = null; - gpuOptionsBuilder_ = null; - } - - return this; - } - /** - * optional .tensorflow.GPUOptions gpu_options = 6; - * - *
-     * Options that apply to all GPUs.
-     * 
- */ - public org.tensorflow.framework.GPUOptions.Builder getGpuOptionsBuilder() { - - onChanged(); - return getGpuOptionsFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.GPUOptions gpu_options = 6; - * - *
-     * Options that apply to all GPUs.
-     * 
- */ - public org.tensorflow.framework.GPUOptionsOrBuilder getGpuOptionsOrBuilder() { - if (gpuOptionsBuilder_ != null) { - return gpuOptionsBuilder_.getMessageOrBuilder(); - } else { - return gpuOptions_ == null ? - org.tensorflow.framework.GPUOptions.getDefaultInstance() : gpuOptions_; - } - } - /** - * optional .tensorflow.GPUOptions gpu_options = 6; - * - *
-     * Options that apply to all GPUs.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.GPUOptions, org.tensorflow.framework.GPUOptions.Builder, org.tensorflow.framework.GPUOptionsOrBuilder> - getGpuOptionsFieldBuilder() { - if (gpuOptionsBuilder_ == null) { - gpuOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.GPUOptions, org.tensorflow.framework.GPUOptions.Builder, org.tensorflow.framework.GPUOptionsOrBuilder>( - getGpuOptions(), - getParentForChildren(), - isClean()); - gpuOptions_ = null; - } - return gpuOptionsBuilder_; - } - - private boolean allowSoftPlacement_ ; - /** - * optional bool allow_soft_placement = 7; - * - *
-     * Whether soft placement is allowed. If allow_soft_placement is true,
-     * an op will be placed on CPU if
-     *   1. there's no GPU implementation for the OP
-     * or
-     *   2. no GPU devices are known or registered
-     * or
-     *   3. need to co-locate with reftype input(s) which are from CPU.
-     * 
- */ - public boolean getAllowSoftPlacement() { - return allowSoftPlacement_; - } - /** - * optional bool allow_soft_placement = 7; - * - *
-     * Whether soft placement is allowed. If allow_soft_placement is true,
-     * an op will be placed on CPU if
-     *   1. there's no GPU implementation for the OP
-     * or
-     *   2. no GPU devices are known or registered
-     * or
-     *   3. need to co-locate with reftype input(s) which are from CPU.
-     * 
- */ - public Builder setAllowSoftPlacement(boolean value) { - - allowSoftPlacement_ = value; - onChanged(); - return this; - } - /** - * optional bool allow_soft_placement = 7; - * - *
-     * Whether soft placement is allowed. If allow_soft_placement is true,
-     * an op will be placed on CPU if
-     *   1. there's no GPU implementation for the OP
-     * or
-     *   2. no GPU devices are known or registered
-     * or
-     *   3. need to co-locate with reftype input(s) which are from CPU.
-     * 
- */ - public Builder clearAllowSoftPlacement() { - - allowSoftPlacement_ = false; - onChanged(); - return this; - } - - private boolean logDevicePlacement_ ; - /** - * optional bool log_device_placement = 8; - * - *
-     * Whether device placements should be logged.
-     * 
- */ - public boolean getLogDevicePlacement() { - return logDevicePlacement_; - } - /** - * optional bool log_device_placement = 8; - * - *
-     * Whether device placements should be logged.
-     * 
- */ - public Builder setLogDevicePlacement(boolean value) { - - logDevicePlacement_ = value; - onChanged(); - return this; - } - /** - * optional bool log_device_placement = 8; - * - *
-     * Whether device placements should be logged.
-     * 
- */ - public Builder clearLogDevicePlacement() { - - logDevicePlacement_ = false; - onChanged(); - return this; - } - - private org.tensorflow.framework.GraphOptions graphOptions_ = null; - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.GraphOptions, org.tensorflow.framework.GraphOptions.Builder, org.tensorflow.framework.GraphOptionsOrBuilder> graphOptionsBuilder_; - /** - * optional .tensorflow.GraphOptions graph_options = 10; - * - *
-     * Options that apply to all graphs.
-     * 
- */ - public boolean hasGraphOptions() { - return graphOptionsBuilder_ != null || graphOptions_ != null; - } - /** - * optional .tensorflow.GraphOptions graph_options = 10; - * - *
-     * Options that apply to all graphs.
-     * 
- */ - public org.tensorflow.framework.GraphOptions getGraphOptions() { - if (graphOptionsBuilder_ == null) { - return graphOptions_ == null ? org.tensorflow.framework.GraphOptions.getDefaultInstance() : graphOptions_; - } else { - return graphOptionsBuilder_.getMessage(); - } - } - /** - * optional .tensorflow.GraphOptions graph_options = 10; - * - *
-     * Options that apply to all graphs.
-     * 
- */ - public Builder setGraphOptions(org.tensorflow.framework.GraphOptions value) { - if (graphOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - graphOptions_ = value; - onChanged(); - } else { - graphOptionsBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .tensorflow.GraphOptions graph_options = 10; - * - *
-     * Options that apply to all graphs.
-     * 
- */ - public Builder setGraphOptions( - org.tensorflow.framework.GraphOptions.Builder builderForValue) { - if (graphOptionsBuilder_ == null) { - graphOptions_ = builderForValue.build(); - onChanged(); - } else { - graphOptionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .tensorflow.GraphOptions graph_options = 10; - * - *
-     * Options that apply to all graphs.
-     * 
- */ - public Builder mergeGraphOptions(org.tensorflow.framework.GraphOptions value) { - if (graphOptionsBuilder_ == null) { - if (graphOptions_ != null) { - graphOptions_ = - org.tensorflow.framework.GraphOptions.newBuilder(graphOptions_).mergeFrom(value).buildPartial(); - } else { - graphOptions_ = value; - } - onChanged(); - } else { - graphOptionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .tensorflow.GraphOptions graph_options = 10; - * - *
-     * Options that apply to all graphs.
-     * 
- */ - public Builder clearGraphOptions() { - if (graphOptionsBuilder_ == null) { - graphOptions_ = null; - onChanged(); - } else { - graphOptions_ = null; - graphOptionsBuilder_ = null; - } - - return this; - } - /** - * optional .tensorflow.GraphOptions graph_options = 10; - * - *
-     * Options that apply to all graphs.
-     * 
- */ - public org.tensorflow.framework.GraphOptions.Builder getGraphOptionsBuilder() { - - onChanged(); - return getGraphOptionsFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.GraphOptions graph_options = 10; - * - *
-     * Options that apply to all graphs.
-     * 
- */ - public org.tensorflow.framework.GraphOptionsOrBuilder getGraphOptionsOrBuilder() { - if (graphOptionsBuilder_ != null) { - return graphOptionsBuilder_.getMessageOrBuilder(); - } else { - return graphOptions_ == null ? - org.tensorflow.framework.GraphOptions.getDefaultInstance() : graphOptions_; - } - } - /** - * optional .tensorflow.GraphOptions graph_options = 10; - * - *
-     * Options that apply to all graphs.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.GraphOptions, org.tensorflow.framework.GraphOptions.Builder, org.tensorflow.framework.GraphOptionsOrBuilder> - getGraphOptionsFieldBuilder() { - if (graphOptionsBuilder_ == null) { - graphOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.GraphOptions, org.tensorflow.framework.GraphOptions.Builder, org.tensorflow.framework.GraphOptionsOrBuilder>( - getGraphOptions(), - getParentForChildren(), - isClean()); - graphOptions_ = null; - } - return graphOptionsBuilder_; - } - 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.ConfigProto) - } - - // @@protoc_insertion_point(class_scope:tensorflow.ConfigProto) - private static final org.tensorflow.framework.ConfigProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.ConfigProto(); - } - - public static org.tensorflow.framework.ConfigProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ConfigProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ConfigProto(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.ConfigProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/ConfigProtoOrBuilder.java b/src/main/java/org/tensorflow/framework/ConfigProtoOrBuilder.java deleted file mode 100644 index 4a43928..0000000 --- a/src/main/java/org/tensorflow/framework/ConfigProtoOrBuilder.java +++ /dev/null @@ -1,186 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/config.proto - -package org.tensorflow.framework; - -public interface ConfigProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.ConfigProto) - com.google.protobuf.MessageOrBuilder { - - /** - * map<string, int32> device_count = 1; - * - *
-   * Map from device type name (e.g., "CPU" or "GPU" ) to maximum
-   * number of devices of that type to use.  If a particular device
-   * type is not found in the map, the system picks an appropriate
-   * number.
-   * 
- */ - java.util.Map - getDeviceCount(); - - /** - * optional int32 intra_op_parallelism_threads = 2; - * - *
-   * The execution of an individual op (for some op types) can be
-   * parallelized on a pool of intra_op_parallelism_threads.
-   * 0 means the system picks an appropriate number.
-   * 
- */ - int getIntraOpParallelismThreads(); - - /** - * optional int32 inter_op_parallelism_threads = 5; - * - *
-   * Nodes that perform blocking operations are enqueued on a pool of
-   * inter_op_parallelism_threads available in each process.
-   * 0 means the system picks an appropriate number.
-   * Note that the first Session created in the process sets the
-   * number of threads for all future sessions unless use_per_session_threads is
-   * true.
-   * 
- */ - int getInterOpParallelismThreads(); - - /** - * optional bool use_per_session_threads = 9; - * - *
-   * If true, use a new set of threads for this session rather than the global
-   * pool of threads. Only supported by direct sessions.
-   * If false, use the global threads created by the first session.
-   * 
- */ - boolean getUsePerSessionThreads(); - - /** - * optional int32 placement_period = 3; - * - *
-   * Assignment of Nodes to Devices is recomputed every placement_period
-   * steps until the system warms up (at which point the recomputation
-   * typically slows down automatically).
-   * 
- */ - int getPlacementPeriod(); - - /** - * repeated string device_filters = 4; - * - *
-   * When any filters are present sessions will ignore all devices which do not
-   * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-   * "/job:worker/replica:3", etc.
-   * 
- */ - com.google.protobuf.ProtocolStringList - getDeviceFiltersList(); - /** - * repeated string device_filters = 4; - * - *
-   * When any filters are present sessions will ignore all devices which do not
-   * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-   * "/job:worker/replica:3", etc.
-   * 
- */ - int getDeviceFiltersCount(); - /** - * repeated string device_filters = 4; - * - *
-   * When any filters are present sessions will ignore all devices which do not
-   * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-   * "/job:worker/replica:3", etc.
-   * 
- */ - java.lang.String getDeviceFilters(int index); - /** - * repeated string device_filters = 4; - * - *
-   * When any filters are present sessions will ignore all devices which do not
-   * match the filters. Each filter can be partially specified, e.g. "/job:ps"
-   * "/job:worker/replica:3", etc.
-   * 
- */ - com.google.protobuf.ByteString - getDeviceFiltersBytes(int index); - - /** - * optional .tensorflow.GPUOptions gpu_options = 6; - * - *
-   * Options that apply to all GPUs.
-   * 
- */ - boolean hasGpuOptions(); - /** - * optional .tensorflow.GPUOptions gpu_options = 6; - * - *
-   * Options that apply to all GPUs.
-   * 
- */ - org.tensorflow.framework.GPUOptions getGpuOptions(); - /** - * optional .tensorflow.GPUOptions gpu_options = 6; - * - *
-   * Options that apply to all GPUs.
-   * 
- */ - org.tensorflow.framework.GPUOptionsOrBuilder getGpuOptionsOrBuilder(); - - /** - * optional bool allow_soft_placement = 7; - * - *
-   * Whether soft placement is allowed. If allow_soft_placement is true,
-   * an op will be placed on CPU if
-   *   1. there's no GPU implementation for the OP
-   * or
-   *   2. no GPU devices are known or registered
-   * or
-   *   3. need to co-locate with reftype input(s) which are from CPU.
-   * 
- */ - boolean getAllowSoftPlacement(); - - /** - * optional bool log_device_placement = 8; - * - *
-   * Whether device placements should be logged.
-   * 
- */ - boolean getLogDevicePlacement(); - - /** - * optional .tensorflow.GraphOptions graph_options = 10; - * - *
-   * Options that apply to all graphs.
-   * 
- */ - boolean hasGraphOptions(); - /** - * optional .tensorflow.GraphOptions graph_options = 10; - * - *
-   * Options that apply to all graphs.
-   * 
- */ - org.tensorflow.framework.GraphOptions getGraphOptions(); - /** - * optional .tensorflow.GraphOptions graph_options = 10; - * - *
-   * Options that apply to all graphs.
-   * 
- */ - org.tensorflow.framework.GraphOptionsOrBuilder getGraphOptionsOrBuilder(); -} diff --git a/src/main/java/org/tensorflow/framework/ConfigProtos.java b/src/main/java/org/tensorflow/framework/ConfigProtos.java deleted file mode 100644 index 288f068..0000000 --- a/src/main/java/org/tensorflow/framework/ConfigProtos.java +++ /dev/null @@ -1,117 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/config.proto - -package org.tensorflow.framework; - -public final class ConfigProtos { - private ConfigProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_GPUOptions_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_GPUOptions_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_OptimizerOptions_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_OptimizerOptions_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_GraphOptions_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_GraphOptions_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_ConfigProto_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_ConfigProto_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_ConfigProto_DeviceCountEntry_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_ConfigProto_DeviceCountEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n&tensorflow/core/framework/config.proto" + - "\022\ntensorflow\"n\n\nGPUOptions\022\'\n\037per_proces" + - "s_gpu_memory_fraction\030\001 \001(\001\022\026\n\016allocator" + - "_type\030\002 \001(\t\022\037\n\027deferred_deletion_bytes\030\003" + - " \001(\003\"\333\001\n\020OptimizerOptions\022+\n#do_common_s" + - "ubexpression_elimination\030\001 \001(\010\022\033\n\023do_con" + - "stant_folding\030\002 \001(\010\022\034\n\024do_function_inlin" + - "ing\030\004 \001(\010\0225\n\topt_level\030\003 \001(\0162\".tensorflo" + - "w.OptimizerOptions.Level\"(\n\005Level\022\006\n\002L1\020" + - "\000\022\006\n\002L2\020\002\022\017\n\002L0\020\377\377\377\377\377\377\377\377\377\001\"\224\001\n\014GraphOpti", - "ons\022\036\n\026enable_recv_scheduling\030\002 \001(\010\0227\n\021o" + - "ptimizer_options\030\003 \001(\0132\034.tensorflow.Opti" + - "mizerOptionsJ\004\010\001\020\002R%skip_common_subexpre" + - "ssion_elimination\"\272\003\n\013ConfigProto\022>\n\014dev" + - "ice_count\030\001 \003(\0132(.tensorflow.ConfigProto" + - ".DeviceCountEntry\022$\n\034intra_op_parallelis" + - "m_threads\030\002 \001(\005\022$\n\034inter_op_parallelism_" + - "threads\030\005 \001(\005\022\037\n\027use_per_session_threads" + - "\030\t \001(\010\022\030\n\020placement_period\030\003 \001(\005\022\026\n\016devi" + - "ce_filters\030\004 \003(\t\022+\n\013gpu_options\030\006 \001(\0132\026.", - "tensorflow.GPUOptions\022\034\n\024allow_soft_plac" + - "ement\030\007 \001(\010\022\034\n\024log_device_placement\030\010 \001(" + - "\010\022/\n\rgraph_options\030\n \001(\0132\030.tensorflow.Gr" + - "aphOptions\0322\n\020DeviceCountEntry\022\013\n\003key\030\001 " + - "\001(\t\022\r\n\005value\030\002 \001(\005:\0028\001B*\n\030org.tensorflow" + - ".frameworkB\014ConfigProtosP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_tensorflow_GPUOptions_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_tensorflow_GPUOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_GPUOptions_descriptor, - new java.lang.String[] { "PerProcessGpuMemoryFraction", "AllocatorType", "DeferredDeletionBytes", }); - internal_static_tensorflow_OptimizerOptions_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_tensorflow_OptimizerOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_OptimizerOptions_descriptor, - new java.lang.String[] { "DoCommonSubexpressionElimination", "DoConstantFolding", "DoFunctionInlining", "OptLevel", }); - internal_static_tensorflow_GraphOptions_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_tensorflow_GraphOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_GraphOptions_descriptor, - new java.lang.String[] { "EnableRecvScheduling", "OptimizerOptions", }); - internal_static_tensorflow_ConfigProto_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_tensorflow_ConfigProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_ConfigProto_descriptor, - new java.lang.String[] { "DeviceCount", "IntraOpParallelismThreads", "InterOpParallelismThreads", "UsePerSessionThreads", "PlacementPeriod", "DeviceFilters", "GpuOptions", "AllowSoftPlacement", "LogDevicePlacement", "GraphOptions", }); - internal_static_tensorflow_ConfigProto_DeviceCountEntry_descriptor = - internal_static_tensorflow_ConfigProto_descriptor.getNestedTypes().get(0); - internal_static_tensorflow_ConfigProto_DeviceCountEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_ConfigProto_DeviceCountEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/org/tensorflow/framework/DataType.java b/src/main/java/org/tensorflow/framework/DataType.java deleted file mode 100644 index effd8eb..0000000 --- a/src/main/java/org/tensorflow/framework/DataType.java +++ /dev/null @@ -1,481 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/types.proto - -package org.tensorflow.framework; - -/** - * Protobuf enum {@code tensorflow.DataType} - */ -public enum DataType - implements com.google.protobuf.ProtocolMessageEnum { - /** - * DT_INVALID = 0; - * - *
-   * Not a legal value for DataType.  Used to indicate a DataType field
-   * has not been set.
-   * 
- */ - DT_INVALID(0, 0), - /** - * DT_FLOAT = 1; - * - *
-   * Data types that all computation devices are expected to be
-   * capable to support.
-   * 
- */ - DT_FLOAT(1, 1), - /** - * DT_DOUBLE = 2; - */ - DT_DOUBLE(2, 2), - /** - * DT_INT32 = 3; - */ - DT_INT32(3, 3), - /** - * DT_UINT8 = 4; - */ - DT_UINT8(4, 4), - /** - * DT_INT16 = 5; - */ - DT_INT16(5, 5), - /** - * DT_INT8 = 6; - */ - DT_INT8(6, 6), - /** - * DT_STRING = 7; - */ - DT_STRING(7, 7), - /** - * DT_COMPLEX64 = 8; - * - *
-   * Single-precision complex
-   * 
- */ - DT_COMPLEX64(8, 8), - /** - * DT_INT64 = 9; - */ - DT_INT64(9, 9), - /** - * DT_BOOL = 10; - */ - DT_BOOL(10, 10), - /** - * DT_QINT8 = 11; - * - *
-   * Quantized int8
-   * 
- */ - DT_QINT8(11, 11), - /** - * DT_QUINT8 = 12; - * - *
-   * Quantized uint8
-   * 
- */ - DT_QUINT8(12, 12), - /** - * DT_QINT32 = 13; - * - *
-   * Quantized int32
-   * 
- */ - DT_QINT32(13, 13), - /** - * DT_BFLOAT16 = 14; - * - *
-   * Float32 truncated to 16 bits.  Only for cast ops.
-   * 
- */ - DT_BFLOAT16(14, 14), - /** - * DT_QINT16 = 15; - * - *
-   * Quantized int16
-   * 
- */ - DT_QINT16(15, 15), - /** - * DT_QUINT16 = 16; - * - *
-   * Quantized uint16
-   * 
- */ - DT_QUINT16(16, 16), - /** - * DT_UINT16 = 17; - */ - DT_UINT16(17, 17), - /** - * DT_FLOAT_REF = 101; - * - *
-   * Do not use!  These are only for parameters.  Every enum above
-   * should have a corresponding value below (verified by types_test).
-   * 
- */ - DT_FLOAT_REF(18, 101), - /** - * DT_DOUBLE_REF = 102; - */ - DT_DOUBLE_REF(19, 102), - /** - * DT_INT32_REF = 103; - */ - DT_INT32_REF(20, 103), - /** - * DT_UINT8_REF = 104; - */ - DT_UINT8_REF(21, 104), - /** - * DT_INT16_REF = 105; - */ - DT_INT16_REF(22, 105), - /** - * DT_INT8_REF = 106; - */ - DT_INT8_REF(23, 106), - /** - * DT_STRING_REF = 107; - */ - DT_STRING_REF(24, 107), - /** - * DT_COMPLEX64_REF = 108; - */ - DT_COMPLEX64_REF(25, 108), - /** - * DT_INT64_REF = 109; - */ - DT_INT64_REF(26, 109), - /** - * DT_BOOL_REF = 110; - */ - DT_BOOL_REF(27, 110), - /** - * DT_QINT8_REF = 111; - */ - DT_QINT8_REF(28, 111), - /** - * DT_QUINT8_REF = 112; - */ - DT_QUINT8_REF(29, 112), - /** - * DT_QINT32_REF = 113; - */ - DT_QINT32_REF(30, 113), - /** - * DT_BFLOAT16_REF = 114; - */ - DT_BFLOAT16_REF(31, 114), - /** - * DT_QINT16_REF = 115; - */ - DT_QINT16_REF(32, 115), - /** - * DT_QUINT16_REF = 116; - */ - DT_QUINT16_REF(33, 116), - /** - * DT_UINT16_REF = 117; - */ - DT_UINT16_REF(34, 117), - UNRECOGNIZED(-1, -1), - ; - - /** - * DT_INVALID = 0; - * - *
-   * Not a legal value for DataType.  Used to indicate a DataType field
-   * has not been set.
-   * 
- */ - public static final int DT_INVALID_VALUE = 0; - /** - * DT_FLOAT = 1; - * - *
-   * Data types that all computation devices are expected to be
-   * capable to support.
-   * 
- */ - public static final int DT_FLOAT_VALUE = 1; - /** - * DT_DOUBLE = 2; - */ - public static final int DT_DOUBLE_VALUE = 2; - /** - * DT_INT32 = 3; - */ - public static final int DT_INT32_VALUE = 3; - /** - * DT_UINT8 = 4; - */ - public static final int DT_UINT8_VALUE = 4; - /** - * DT_INT16 = 5; - */ - public static final int DT_INT16_VALUE = 5; - /** - * DT_INT8 = 6; - */ - public static final int DT_INT8_VALUE = 6; - /** - * DT_STRING = 7; - */ - public static final int DT_STRING_VALUE = 7; - /** - * DT_COMPLEX64 = 8; - * - *
-   * Single-precision complex
-   * 
- */ - public static final int DT_COMPLEX64_VALUE = 8; - /** - * DT_INT64 = 9; - */ - public static final int DT_INT64_VALUE = 9; - /** - * DT_BOOL = 10; - */ - public static final int DT_BOOL_VALUE = 10; - /** - * DT_QINT8 = 11; - * - *
-   * Quantized int8
-   * 
- */ - public static final int DT_QINT8_VALUE = 11; - /** - * DT_QUINT8 = 12; - * - *
-   * Quantized uint8
-   * 
- */ - public static final int DT_QUINT8_VALUE = 12; - /** - * DT_QINT32 = 13; - * - *
-   * Quantized int32
-   * 
- */ - public static final int DT_QINT32_VALUE = 13; - /** - * DT_BFLOAT16 = 14; - * - *
-   * Float32 truncated to 16 bits.  Only for cast ops.
-   * 
- */ - public static final int DT_BFLOAT16_VALUE = 14; - /** - * DT_QINT16 = 15; - * - *
-   * Quantized int16
-   * 
- */ - public static final int DT_QINT16_VALUE = 15; - /** - * DT_QUINT16 = 16; - * - *
-   * Quantized uint16
-   * 
- */ - public static final int DT_QUINT16_VALUE = 16; - /** - * DT_UINT16 = 17; - */ - public static final int DT_UINT16_VALUE = 17; - /** - * DT_FLOAT_REF = 101; - * - *
-   * Do not use!  These are only for parameters.  Every enum above
-   * should have a corresponding value below (verified by types_test).
-   * 
- */ - public static final int DT_FLOAT_REF_VALUE = 101; - /** - * DT_DOUBLE_REF = 102; - */ - public static final int DT_DOUBLE_REF_VALUE = 102; - /** - * DT_INT32_REF = 103; - */ - public static final int DT_INT32_REF_VALUE = 103; - /** - * DT_UINT8_REF = 104; - */ - public static final int DT_UINT8_REF_VALUE = 104; - /** - * DT_INT16_REF = 105; - */ - public static final int DT_INT16_REF_VALUE = 105; - /** - * DT_INT8_REF = 106; - */ - public static final int DT_INT8_REF_VALUE = 106; - /** - * DT_STRING_REF = 107; - */ - public static final int DT_STRING_REF_VALUE = 107; - /** - * DT_COMPLEX64_REF = 108; - */ - public static final int DT_COMPLEX64_REF_VALUE = 108; - /** - * DT_INT64_REF = 109; - */ - public static final int DT_INT64_REF_VALUE = 109; - /** - * DT_BOOL_REF = 110; - */ - public static final int DT_BOOL_REF_VALUE = 110; - /** - * DT_QINT8_REF = 111; - */ - public static final int DT_QINT8_REF_VALUE = 111; - /** - * DT_QUINT8_REF = 112; - */ - public static final int DT_QUINT8_REF_VALUE = 112; - /** - * DT_QINT32_REF = 113; - */ - public static final int DT_QINT32_REF_VALUE = 113; - /** - * DT_BFLOAT16_REF = 114; - */ - public static final int DT_BFLOAT16_REF_VALUE = 114; - /** - * DT_QINT16_REF = 115; - */ - public static final int DT_QINT16_REF_VALUE = 115; - /** - * DT_QUINT16_REF = 116; - */ - public static final int DT_QUINT16_REF_VALUE = 116; - /** - * DT_UINT16_REF = 117; - */ - public static final int DT_UINT16_REF_VALUE = 117; - - - public final int getNumber() { - if (index == -1) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - public static DataType valueOf(int value) { - switch (value) { - case 0: return DT_INVALID; - case 1: return DT_FLOAT; - case 2: return DT_DOUBLE; - case 3: return DT_INT32; - case 4: return DT_UINT8; - case 5: return DT_INT16; - case 6: return DT_INT8; - case 7: return DT_STRING; - case 8: return DT_COMPLEX64; - case 9: return DT_INT64; - case 10: return DT_BOOL; - case 11: return DT_QINT8; - case 12: return DT_QUINT8; - case 13: return DT_QINT32; - case 14: return DT_BFLOAT16; - case 15: return DT_QINT16; - case 16: return DT_QUINT16; - case 17: return DT_UINT16; - case 101: return DT_FLOAT_REF; - case 102: return DT_DOUBLE_REF; - case 103: return DT_INT32_REF; - case 104: return DT_UINT8_REF; - case 105: return DT_INT16_REF; - case 106: return DT_INT8_REF; - case 107: return DT_STRING_REF; - case 108: return DT_COMPLEX64_REF; - case 109: return DT_INT64_REF; - case 110: return DT_BOOL_REF; - case 111: return DT_QINT8_REF; - case 112: return DT_QUINT8_REF; - case 113: return DT_QINT32_REF; - case 114: return DT_BFLOAT16_REF; - case 115: return DT_QINT16_REF; - case 116: return DT_QUINT16_REF; - case 117: return DT_UINT16_REF; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - DataType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DataType findValueByNumber(int number) { - return DataType.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return org.tensorflow.framework.TypesProtos.getDescriptor() - .getEnumTypes().get(0); - } - - private static final DataType[] VALUES = values(); - - public static DataType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private DataType(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:tensorflow.DataType) -} - diff --git a/src/main/java/org/tensorflow/framework/DeviceAttributes.java b/src/main/java/org/tensorflow/framework/DeviceAttributes.java deleted file mode 100644 index 1e9fac9..0000000 --- a/src/main/java/org/tensorflow/framework/DeviceAttributes.java +++ /dev/null @@ -1,966 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/device_attributes.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.DeviceAttributes} - */ -public final class DeviceAttributes extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.DeviceAttributes) - DeviceAttributesOrBuilder { - // Use DeviceAttributes.newBuilder() to construct. - private DeviceAttributes(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DeviceAttributes() { - name_ = ""; - deviceType_ = ""; - memoryLimit_ = 0L; - busAdjacency_ = 0; - incarnation_ = 0L; - physicalDeviceDesc_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private DeviceAttributes( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - deviceType_ = s; - break; - } - case 32: { - - memoryLimit_ = input.readInt64(); - break; - } - case 40: { - int rawValue = input.readEnum(); - - busAdjacency_ = rawValue; - break; - } - case 49: { - - incarnation_ = input.readFixed64(); - break; - } - case 58: { - String s = input.readStringRequireUtf8(); - - physicalDeviceDesc_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.DeviceAttributesProtos.internal_static_tensorflow_DeviceAttributes_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.DeviceAttributesProtos.internal_static_tensorflow_DeviceAttributes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.DeviceAttributes.class, org.tensorflow.framework.DeviceAttributes.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEVICE_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object deviceType_; - /** - * optional string device_type = 2; - * - *
-   * String representation of device_type.
-   * 
- */ - public java.lang.String getDeviceType() { - java.lang.Object ref = deviceType_; - 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(); - deviceType_ = s; - return s; - } - } - /** - * optional string device_type = 2; - * - *
-   * String representation of device_type.
-   * 
- */ - public com.google.protobuf.ByteString - getDeviceTypeBytes() { - java.lang.Object ref = deviceType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - deviceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MEMORY_LIMIT_FIELD_NUMBER = 4; - private long memoryLimit_; - /** - * optional int64 memory_limit = 4; - * - *
-   * Memory capacity of device in bytes.
-   * 
- */ - public long getMemoryLimit() { - return memoryLimit_; - } - - public static final int BUS_ADJACENCY_FIELD_NUMBER = 5; - private int busAdjacency_; - /** - * optional .tensorflow.BusAdjacency bus_adjacency = 5; - */ - public int getBusAdjacencyValue() { - return busAdjacency_; - } - /** - * optional .tensorflow.BusAdjacency bus_adjacency = 5; - */ - public org.tensorflow.framework.BusAdjacency getBusAdjacency() { - org.tensorflow.framework.BusAdjacency result = org.tensorflow.framework.BusAdjacency.valueOf(busAdjacency_); - return result == null ? org.tensorflow.framework.BusAdjacency.UNRECOGNIZED : result; - } - - public static final int INCARNATION_FIELD_NUMBER = 6; - private long incarnation_; - /** - * optional fixed64 incarnation = 6; - * - *
-   * A device is assigned a global unique number each time it is
-   * initialized. "incarnation" should never be 0.
-   * 
- */ - public long getIncarnation() { - return incarnation_; - } - - public static final int PHYSICAL_DEVICE_DESC_FIELD_NUMBER = 7; - private volatile java.lang.Object physicalDeviceDesc_; - /** - * optional string physical_device_desc = 7; - * - *
-   * String representation of the physical device that this device maps to.
-   * 
- */ - public java.lang.String getPhysicalDeviceDesc() { - java.lang.Object ref = physicalDeviceDesc_; - 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(); - physicalDeviceDesc_ = s; - return s; - } - } - /** - * optional string physical_device_desc = 7; - * - *
-   * String representation of the physical device that this device maps to.
-   * 
- */ - public com.google.protobuf.ByteString - getPhysicalDeviceDescBytes() { - java.lang.Object ref = physicalDeviceDesc_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - physicalDeviceDesc_ = 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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (!getDeviceTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, deviceType_); - } - if (memoryLimit_ != 0L) { - output.writeInt64(4, memoryLimit_); - } - if (busAdjacency_ != org.tensorflow.framework.BusAdjacency.BUS_0.getNumber()) { - output.writeEnum(5, busAdjacency_); - } - if (incarnation_ != 0L) { - output.writeFixed64(6, incarnation_); - } - if (!getPhysicalDeviceDescBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 7, physicalDeviceDesc_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (!getDeviceTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, deviceType_); - } - if (memoryLimit_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, memoryLimit_); - } - if (busAdjacency_ != org.tensorflow.framework.BusAdjacency.BUS_0.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, busAdjacency_); - } - if (incarnation_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(6, incarnation_); - } - if (!getPhysicalDeviceDescBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(7, physicalDeviceDesc_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.DeviceAttributes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.DeviceAttributes 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.DeviceAttributes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.DeviceAttributes parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.DeviceAttributes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.DeviceAttributes parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.DeviceAttributes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.DeviceAttributes parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.DeviceAttributes parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.DeviceAttributes parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.DeviceAttributes 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.DeviceAttributes} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.DeviceAttributes) - org.tensorflow.framework.DeviceAttributesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.DeviceAttributesProtos.internal_static_tensorflow_DeviceAttributes_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.DeviceAttributesProtos.internal_static_tensorflow_DeviceAttributes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.DeviceAttributes.class, org.tensorflow.framework.DeviceAttributes.Builder.class); - } - - // Construct using org.tensorflow.framework.DeviceAttributes.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - deviceType_ = ""; - - memoryLimit_ = 0L; - - busAdjacency_ = 0; - - incarnation_ = 0L; - - physicalDeviceDesc_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.DeviceAttributesProtos.internal_static_tensorflow_DeviceAttributes_descriptor; - } - - public org.tensorflow.framework.DeviceAttributes getDefaultInstanceForType() { - return org.tensorflow.framework.DeviceAttributes.getDefaultInstance(); - } - - public org.tensorflow.framework.DeviceAttributes build() { - org.tensorflow.framework.DeviceAttributes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.DeviceAttributes buildPartial() { - org.tensorflow.framework.DeviceAttributes result = new org.tensorflow.framework.DeviceAttributes(this); - result.name_ = name_; - result.deviceType_ = deviceType_; - result.memoryLimit_ = memoryLimit_; - result.busAdjacency_ = busAdjacency_; - result.incarnation_ = incarnation_; - result.physicalDeviceDesc_ = physicalDeviceDesc_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.DeviceAttributes) { - return mergeFrom((org.tensorflow.framework.DeviceAttributes)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.DeviceAttributes other) { - if (other == org.tensorflow.framework.DeviceAttributes.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDeviceType().isEmpty()) { - deviceType_ = other.deviceType_; - onChanged(); - } - if (other.getMemoryLimit() != 0L) { - setMemoryLimit(other.getMemoryLimit()); - } - if (other.busAdjacency_ != 0) { - setBusAdjacencyValue(other.getBusAdjacencyValue()); - } - if (other.getIncarnation() != 0L) { - setIncarnation(other.getIncarnation()); - } - if (!other.getPhysicalDeviceDesc().isEmpty()) { - physicalDeviceDesc_ = other.physicalDeviceDesc_; - 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.DeviceAttributes parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.DeviceAttributes) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object deviceType_ = ""; - /** - * optional string device_type = 2; - * - *
-     * String representation of device_type.
-     * 
- */ - public java.lang.String getDeviceType() { - java.lang.Object ref = deviceType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - deviceType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string device_type = 2; - * - *
-     * String representation of device_type.
-     * 
- */ - public com.google.protobuf.ByteString - getDeviceTypeBytes() { - java.lang.Object ref = deviceType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - deviceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string device_type = 2; - * - *
-     * String representation of device_type.
-     * 
- */ - public Builder setDeviceType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - deviceType_ = value; - onChanged(); - return this; - } - /** - * optional string device_type = 2; - * - *
-     * String representation of device_type.
-     * 
- */ - public Builder clearDeviceType() { - - deviceType_ = getDefaultInstance().getDeviceType(); - onChanged(); - return this; - } - /** - * optional string device_type = 2; - * - *
-     * String representation of device_type.
-     * 
- */ - public Builder setDeviceTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - deviceType_ = value; - onChanged(); - return this; - } - - private long memoryLimit_ ; - /** - * optional int64 memory_limit = 4; - * - *
-     * Memory capacity of device in bytes.
-     * 
- */ - public long getMemoryLimit() { - return memoryLimit_; - } - /** - * optional int64 memory_limit = 4; - * - *
-     * Memory capacity of device in bytes.
-     * 
- */ - public Builder setMemoryLimit(long value) { - - memoryLimit_ = value; - onChanged(); - return this; - } - /** - * optional int64 memory_limit = 4; - * - *
-     * Memory capacity of device in bytes.
-     * 
- */ - public Builder clearMemoryLimit() { - - memoryLimit_ = 0L; - onChanged(); - return this; - } - - private int busAdjacency_ = 0; - /** - * optional .tensorflow.BusAdjacency bus_adjacency = 5; - */ - public int getBusAdjacencyValue() { - return busAdjacency_; - } - /** - * optional .tensorflow.BusAdjacency bus_adjacency = 5; - */ - public Builder setBusAdjacencyValue(int value) { - busAdjacency_ = value; - onChanged(); - return this; - } - /** - * optional .tensorflow.BusAdjacency bus_adjacency = 5; - */ - public org.tensorflow.framework.BusAdjacency getBusAdjacency() { - org.tensorflow.framework.BusAdjacency result = org.tensorflow.framework.BusAdjacency.valueOf(busAdjacency_); - return result == null ? org.tensorflow.framework.BusAdjacency.UNRECOGNIZED : result; - } - /** - * optional .tensorflow.BusAdjacency bus_adjacency = 5; - */ - public Builder setBusAdjacency(org.tensorflow.framework.BusAdjacency value) { - if (value == null) { - throw new NullPointerException(); - } - - busAdjacency_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .tensorflow.BusAdjacency bus_adjacency = 5; - */ - public Builder clearBusAdjacency() { - - busAdjacency_ = 0; - onChanged(); - return this; - } - - private long incarnation_ ; - /** - * optional fixed64 incarnation = 6; - * - *
-     * A device is assigned a global unique number each time it is
-     * initialized. "incarnation" should never be 0.
-     * 
- */ - public long getIncarnation() { - return incarnation_; - } - /** - * optional fixed64 incarnation = 6; - * - *
-     * A device is assigned a global unique number each time it is
-     * initialized. "incarnation" should never be 0.
-     * 
- */ - public Builder setIncarnation(long value) { - - incarnation_ = value; - onChanged(); - return this; - } - /** - * optional fixed64 incarnation = 6; - * - *
-     * A device is assigned a global unique number each time it is
-     * initialized. "incarnation" should never be 0.
-     * 
- */ - public Builder clearIncarnation() { - - incarnation_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object physicalDeviceDesc_ = ""; - /** - * optional string physical_device_desc = 7; - * - *
-     * String representation of the physical device that this device maps to.
-     * 
- */ - public java.lang.String getPhysicalDeviceDesc() { - java.lang.Object ref = physicalDeviceDesc_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - physicalDeviceDesc_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string physical_device_desc = 7; - * - *
-     * String representation of the physical device that this device maps to.
-     * 
- */ - public com.google.protobuf.ByteString - getPhysicalDeviceDescBytes() { - java.lang.Object ref = physicalDeviceDesc_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - physicalDeviceDesc_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string physical_device_desc = 7; - * - *
-     * String representation of the physical device that this device maps to.
-     * 
- */ - public Builder setPhysicalDeviceDesc( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - physicalDeviceDesc_ = value; - onChanged(); - return this; - } - /** - * optional string physical_device_desc = 7; - * - *
-     * String representation of the physical device that this device maps to.
-     * 
- */ - public Builder clearPhysicalDeviceDesc() { - - physicalDeviceDesc_ = getDefaultInstance().getPhysicalDeviceDesc(); - onChanged(); - return this; - } - /** - * optional string physical_device_desc = 7; - * - *
-     * String representation of the physical device that this device maps to.
-     * 
- */ - public Builder setPhysicalDeviceDescBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - physicalDeviceDesc_ = 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.DeviceAttributes) - } - - // @@protoc_insertion_point(class_scope:tensorflow.DeviceAttributes) - private static final org.tensorflow.framework.DeviceAttributes DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.DeviceAttributes(); - } - - public static org.tensorflow.framework.DeviceAttributes getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public DeviceAttributes parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new DeviceAttributes(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.DeviceAttributes getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/DeviceAttributesOrBuilder.java b/src/main/java/org/tensorflow/framework/DeviceAttributesOrBuilder.java deleted file mode 100644 index ee717eb..0000000 --- a/src/main/java/org/tensorflow/framework/DeviceAttributesOrBuilder.java +++ /dev/null @@ -1,83 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/device_attributes.proto - -package org.tensorflow.framework; - -public interface DeviceAttributesOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.DeviceAttributes) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - */ - java.lang.String getName(); - /** - * optional string name = 1; - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional string device_type = 2; - * - *
-   * String representation of device_type.
-   * 
- */ - java.lang.String getDeviceType(); - /** - * optional string device_type = 2; - * - *
-   * String representation of device_type.
-   * 
- */ - com.google.protobuf.ByteString - getDeviceTypeBytes(); - - /** - * optional int64 memory_limit = 4; - * - *
-   * Memory capacity of device in bytes.
-   * 
- */ - long getMemoryLimit(); - - /** - * optional .tensorflow.BusAdjacency bus_adjacency = 5; - */ - int getBusAdjacencyValue(); - /** - * optional .tensorflow.BusAdjacency bus_adjacency = 5; - */ - org.tensorflow.framework.BusAdjacency getBusAdjacency(); - - /** - * optional fixed64 incarnation = 6; - * - *
-   * A device is assigned a global unique number each time it is
-   * initialized. "incarnation" should never be 0.
-   * 
- */ - long getIncarnation(); - - /** - * optional string physical_device_desc = 7; - * - *
-   * String representation of the physical device that this device maps to.
-   * 
- */ - java.lang.String getPhysicalDeviceDesc(); - /** - * optional string physical_device_desc = 7; - * - *
-   * String representation of the physical device that this device maps to.
-   * 
- */ - com.google.protobuf.ByteString - getPhysicalDeviceDescBytes(); -} diff --git a/src/main/java/org/tensorflow/framework/DeviceAttributesProtos.java b/src/main/java/org/tensorflow/framework/DeviceAttributesProtos.java deleted file mode 100644 index 5b221af..0000000 --- a/src/main/java/org/tensorflow/framework/DeviceAttributesProtos.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/device_attributes.proto - -package org.tensorflow.framework; - -public final class DeviceAttributesProtos { - private DeviceAttributesProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_DeviceAttributes_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_DeviceAttributes_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n1tensorflow/core/framework/device_attri" + - "butes.proto\022\ntensorflow\"\257\001\n\020DeviceAttrib" + - "utes\022\014\n\004name\030\001 \001(\t\022\023\n\013device_type\030\002 \001(\t\022" + - "\024\n\014memory_limit\030\004 \001(\003\022/\n\rbus_adjacency\030\005" + - " \001(\0162\030.tensorflow.BusAdjacency\022\023\n\013incarn" + - "ation\030\006 \001(\006\022\034\n\024physical_device_desc\030\007 \001(" + - "\t*J\n\014BusAdjacency\022\t\n\005BUS_0\020\000\022\t\n\005BUS_1\020\001\022" + - "\013\n\007BUS_ANY\020\002\022\027\n\023BUS_NUM_ADJACENCIES\020\003B4\n" + - "\030org.tensorflow.frameworkB\026DeviceAttribu" + - "tesProtosP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_tensorflow_DeviceAttributes_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_tensorflow_DeviceAttributes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_DeviceAttributes_descriptor, - new java.lang.String[] { "Name", "DeviceType", "MemoryLimit", "BusAdjacency", "Incarnation", "PhysicalDeviceDesc", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/org/tensorflow/framework/DeviceStepStats.java b/src/main/java/org/tensorflow/framework/DeviceStepStats.java deleted file mode 100644 index 32aa041..0000000 --- a/src/main/java/org/tensorflow/framework/DeviceStepStats.java +++ /dev/null @@ -1,781 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/step_stats.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.DeviceStepStats} - */ -public final class DeviceStepStats extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.DeviceStepStats) - DeviceStepStatsOrBuilder { - // Use DeviceStepStats.newBuilder() to construct. - private DeviceStepStats(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DeviceStepStats() { - device_ = ""; - nodeStats_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private DeviceStepStats( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - String s = input.readStringRequireUtf8(); - - device_ = s; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - nodeStats_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - nodeStats_.add(input.readMessage(org.tensorflow.framework.NodeExecStats.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - nodeStats_ = java.util.Collections.unmodifiableList(nodeStats_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.DeviceStepStats.class, org.tensorflow.framework.DeviceStepStats.Builder.class); - } - - private int bitField0_; - public static final int DEVICE_FIELD_NUMBER = 1; - private volatile java.lang.Object device_; - /** - * optional string device = 1; - */ - public java.lang.String getDevice() { - java.lang.Object ref = device_; - 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(); - device_ = s; - return s; - } - } - /** - * optional string device = 1; - */ - public com.google.protobuf.ByteString - getDeviceBytes() { - java.lang.Object ref = device_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - device_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NODE_STATS_FIELD_NUMBER = 2; - private java.util.List nodeStats_; - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public java.util.List getNodeStatsList() { - return nodeStats_; - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public java.util.List - getNodeStatsOrBuilderList() { - return nodeStats_; - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public int getNodeStatsCount() { - return nodeStats_.size(); - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public org.tensorflow.framework.NodeExecStats getNodeStats(int index) { - return nodeStats_.get(index); - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public org.tensorflow.framework.NodeExecStatsOrBuilder getNodeStatsOrBuilder( - int index) { - return nodeStats_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getDeviceBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, device_); - } - for (int i = 0; i < nodeStats_.size(); i++) { - output.writeMessage(2, nodeStats_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getDeviceBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, device_); - } - for (int i = 0; i < nodeStats_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, nodeStats_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.DeviceStepStats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.DeviceStepStats 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.DeviceStepStats parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.DeviceStepStats parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.DeviceStepStats parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.DeviceStepStats parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.DeviceStepStats parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.DeviceStepStats parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.DeviceStepStats parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.DeviceStepStats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.DeviceStepStats 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.DeviceStepStats} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.DeviceStepStats) - org.tensorflow.framework.DeviceStepStatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.DeviceStepStats.class, org.tensorflow.framework.DeviceStepStats.Builder.class); - } - - // Construct using org.tensorflow.framework.DeviceStepStats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getNodeStatsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - device_ = ""; - - if (nodeStatsBuilder_ == null) { - nodeStats_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - nodeStatsBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_descriptor; - } - - public org.tensorflow.framework.DeviceStepStats getDefaultInstanceForType() { - return org.tensorflow.framework.DeviceStepStats.getDefaultInstance(); - } - - public org.tensorflow.framework.DeviceStepStats build() { - org.tensorflow.framework.DeviceStepStats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.DeviceStepStats buildPartial() { - org.tensorflow.framework.DeviceStepStats result = new org.tensorflow.framework.DeviceStepStats(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.device_ = device_; - if (nodeStatsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - nodeStats_ = java.util.Collections.unmodifiableList(nodeStats_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.nodeStats_ = nodeStats_; - } else { - result.nodeStats_ = nodeStatsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.DeviceStepStats) { - return mergeFrom((org.tensorflow.framework.DeviceStepStats)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.DeviceStepStats other) { - if (other == org.tensorflow.framework.DeviceStepStats.getDefaultInstance()) return this; - if (!other.getDevice().isEmpty()) { - device_ = other.device_; - onChanged(); - } - if (nodeStatsBuilder_ == null) { - if (!other.nodeStats_.isEmpty()) { - if (nodeStats_.isEmpty()) { - nodeStats_ = other.nodeStats_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureNodeStatsIsMutable(); - nodeStats_.addAll(other.nodeStats_); - } - onChanged(); - } - } else { - if (!other.nodeStats_.isEmpty()) { - if (nodeStatsBuilder_.isEmpty()) { - nodeStatsBuilder_.dispose(); - nodeStatsBuilder_ = null; - nodeStats_ = other.nodeStats_; - bitField0_ = (bitField0_ & ~0x00000002); - nodeStatsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getNodeStatsFieldBuilder() : null; - } else { - nodeStatsBuilder_.addAllMessages(other.nodeStats_); - } - } - } - 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.DeviceStepStats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.DeviceStepStats) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object device_ = ""; - /** - * optional string device = 1; - */ - public java.lang.String getDevice() { - java.lang.Object ref = device_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - device_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string device = 1; - */ - public com.google.protobuf.ByteString - getDeviceBytes() { - java.lang.Object ref = device_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - device_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string device = 1; - */ - public Builder setDevice( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - device_ = value; - onChanged(); - return this; - } - /** - * optional string device = 1; - */ - public Builder clearDevice() { - - device_ = getDefaultInstance().getDevice(); - onChanged(); - return this; - } - /** - * optional string device = 1; - */ - public Builder setDeviceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - device_ = value; - onChanged(); - return this; - } - - private java.util.List nodeStats_ = - java.util.Collections.emptyList(); - private void ensureNodeStatsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - nodeStats_ = new java.util.ArrayList(nodeStats_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.NodeExecStats, org.tensorflow.framework.NodeExecStats.Builder, org.tensorflow.framework.NodeExecStatsOrBuilder> nodeStatsBuilder_; - - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public java.util.List getNodeStatsList() { - if (nodeStatsBuilder_ == null) { - return java.util.Collections.unmodifiableList(nodeStats_); - } else { - return nodeStatsBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public int getNodeStatsCount() { - if (nodeStatsBuilder_ == null) { - return nodeStats_.size(); - } else { - return nodeStatsBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public org.tensorflow.framework.NodeExecStats getNodeStats(int index) { - if (nodeStatsBuilder_ == null) { - return nodeStats_.get(index); - } else { - return nodeStatsBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public Builder setNodeStats( - int index, org.tensorflow.framework.NodeExecStats value) { - if (nodeStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodeStatsIsMutable(); - nodeStats_.set(index, value); - onChanged(); - } else { - nodeStatsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public Builder setNodeStats( - int index, org.tensorflow.framework.NodeExecStats.Builder builderForValue) { - if (nodeStatsBuilder_ == null) { - ensureNodeStatsIsMutable(); - nodeStats_.set(index, builderForValue.build()); - onChanged(); - } else { - nodeStatsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public Builder addNodeStats(org.tensorflow.framework.NodeExecStats value) { - if (nodeStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodeStatsIsMutable(); - nodeStats_.add(value); - onChanged(); - } else { - nodeStatsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public Builder addNodeStats( - int index, org.tensorflow.framework.NodeExecStats value) { - if (nodeStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodeStatsIsMutable(); - nodeStats_.add(index, value); - onChanged(); - } else { - nodeStatsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public Builder addNodeStats( - org.tensorflow.framework.NodeExecStats.Builder builderForValue) { - if (nodeStatsBuilder_ == null) { - ensureNodeStatsIsMutable(); - nodeStats_.add(builderForValue.build()); - onChanged(); - } else { - nodeStatsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public Builder addNodeStats( - int index, org.tensorflow.framework.NodeExecStats.Builder builderForValue) { - if (nodeStatsBuilder_ == null) { - ensureNodeStatsIsMutable(); - nodeStats_.add(index, builderForValue.build()); - onChanged(); - } else { - nodeStatsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public Builder addAllNodeStats( - java.lang.Iterable values) { - if (nodeStatsBuilder_ == null) { - ensureNodeStatsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, nodeStats_); - onChanged(); - } else { - nodeStatsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public Builder clearNodeStats() { - if (nodeStatsBuilder_ == null) { - nodeStats_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - nodeStatsBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public Builder removeNodeStats(int index) { - if (nodeStatsBuilder_ == null) { - ensureNodeStatsIsMutable(); - nodeStats_.remove(index); - onChanged(); - } else { - nodeStatsBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public org.tensorflow.framework.NodeExecStats.Builder getNodeStatsBuilder( - int index) { - return getNodeStatsFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public org.tensorflow.framework.NodeExecStatsOrBuilder getNodeStatsOrBuilder( - int index) { - if (nodeStatsBuilder_ == null) { - return nodeStats_.get(index); } else { - return nodeStatsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public java.util.List - getNodeStatsOrBuilderList() { - if (nodeStatsBuilder_ != null) { - return nodeStatsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(nodeStats_); - } - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public org.tensorflow.framework.NodeExecStats.Builder addNodeStatsBuilder() { - return getNodeStatsFieldBuilder().addBuilder( - org.tensorflow.framework.NodeExecStats.getDefaultInstance()); - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public org.tensorflow.framework.NodeExecStats.Builder addNodeStatsBuilder( - int index) { - return getNodeStatsFieldBuilder().addBuilder( - index, org.tensorflow.framework.NodeExecStats.getDefaultInstance()); - } - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - public java.util.List - getNodeStatsBuilderList() { - return getNodeStatsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.NodeExecStats, org.tensorflow.framework.NodeExecStats.Builder, org.tensorflow.framework.NodeExecStatsOrBuilder> - getNodeStatsFieldBuilder() { - if (nodeStatsBuilder_ == null) { - nodeStatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.NodeExecStats, org.tensorflow.framework.NodeExecStats.Builder, org.tensorflow.framework.NodeExecStatsOrBuilder>( - nodeStats_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - nodeStats_ = null; - } - return nodeStatsBuilder_; - } - 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.DeviceStepStats) - } - - // @@protoc_insertion_point(class_scope:tensorflow.DeviceStepStats) - private static final org.tensorflow.framework.DeviceStepStats DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.DeviceStepStats(); - } - - public static org.tensorflow.framework.DeviceStepStats getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public DeviceStepStats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new DeviceStepStats(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.DeviceStepStats getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/DeviceStepStatsOrBuilder.java b/src/main/java/org/tensorflow/framework/DeviceStepStatsOrBuilder.java deleted file mode 100644 index ad2fda4..0000000 --- a/src/main/java/org/tensorflow/framework/DeviceStepStatsOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/step_stats.proto - -package org.tensorflow.framework; - -public interface DeviceStepStatsOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.DeviceStepStats) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string device = 1; - */ - java.lang.String getDevice(); - /** - * optional string device = 1; - */ - com.google.protobuf.ByteString - getDeviceBytes(); - - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - java.util.List - getNodeStatsList(); - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - org.tensorflow.framework.NodeExecStats getNodeStats(int index); - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - int getNodeStatsCount(); - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - java.util.List - getNodeStatsOrBuilderList(); - /** - * repeated .tensorflow.NodeExecStats node_stats = 2; - */ - org.tensorflow.framework.NodeExecStatsOrBuilder getNodeStatsOrBuilder( - int index); -} diff --git a/src/main/java/org/tensorflow/framework/FunctionDef.java b/src/main/java/org/tensorflow/framework/FunctionDef.java deleted file mode 100644 index a8237a0..0000000 --- a/src/main/java/org/tensorflow/framework/FunctionDef.java +++ /dev/null @@ -1,2602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/function.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.FunctionDef} - * - *
- * A function can be instantiated when the runtime can bind every attr
- * with a value. When a GraphDef has a call to a function, it must
- * have binding for every attr defined in the signature.
- * TODO(zhifengc):
- *   * device spec, etc.
- * 
- */ -public final class FunctionDef extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.FunctionDef) - FunctionDefOrBuilder { - // Use FunctionDef.newBuilder() to construct. - private FunctionDef(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FunctionDef() { - node_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private FunctionDef( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - org.tensorflow.framework.OpDef.Builder subBuilder = null; - if (signature_ != null) { - subBuilder = signature_.toBuilder(); - } - signature_ = input.readMessage(org.tensorflow.framework.OpDef.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(signature_); - signature_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - node_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - node_.add(input.readMessage(org.tensorflow.framework.FunctionDef.Node.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - node_ = java.util.Collections.unmodifiableList(node_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.FunctionDef.class, org.tensorflow.framework.FunctionDef.Builder.class); - } - - public interface NodeOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.FunctionDef.Node) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string ret = 1; - * - *
-     * This node produces multiple outputs. They are named ret[0],
-     * ret[1], ..., etc.
-     * REQUIRES: function.node.ret[*] are unique across all nodes.
-     * REQUIRES: ret.size == func/op def's number of output args.
-     * 
- */ - com.google.protobuf.ProtocolStringList - getRetList(); - /** - * repeated string ret = 1; - * - *
-     * This node produces multiple outputs. They are named ret[0],
-     * ret[1], ..., etc.
-     * REQUIRES: function.node.ret[*] are unique across all nodes.
-     * REQUIRES: ret.size == func/op def's number of output args.
-     * 
- */ - int getRetCount(); - /** - * repeated string ret = 1; - * - *
-     * This node produces multiple outputs. They are named ret[0],
-     * ret[1], ..., etc.
-     * REQUIRES: function.node.ret[*] are unique across all nodes.
-     * REQUIRES: ret.size == func/op def's number of output args.
-     * 
- */ - java.lang.String getRet(int index); - /** - * repeated string ret = 1; - * - *
-     * This node produces multiple outputs. They are named ret[0],
-     * ret[1], ..., etc.
-     * REQUIRES: function.node.ret[*] are unique across all nodes.
-     * REQUIRES: ret.size == func/op def's number of output args.
-     * 
- */ - com.google.protobuf.ByteString - getRetBytes(int index); - - /** - * optional string op = 2; - * - *
-     * The op/function name.
-     * 
- */ - java.lang.String getOp(); - /** - * optional string op = 2; - * - *
-     * The op/function name.
-     * 
- */ - com.google.protobuf.ByteString - getOpBytes(); - - /** - * repeated string arg = 3; - * - *
-     * Arguments passed to this func/op.
-     * arg[i] must be either one of
-     * function.signature.input_args[*].name or one of
-     * function.node[*].ret[*].
-     * REQUIRES: arg.size == func/op def's number of input args.
-     * 
- */ - com.google.protobuf.ProtocolStringList - getArgList(); - /** - * repeated string arg = 3; - * - *
-     * Arguments passed to this func/op.
-     * arg[i] must be either one of
-     * function.signature.input_args[*].name or one of
-     * function.node[*].ret[*].
-     * REQUIRES: arg.size == func/op def's number of input args.
-     * 
- */ - int getArgCount(); - /** - * repeated string arg = 3; - * - *
-     * Arguments passed to this func/op.
-     * arg[i] must be either one of
-     * function.signature.input_args[*].name or one of
-     * function.node[*].ret[*].
-     * REQUIRES: arg.size == func/op def's number of input args.
-     * 
- */ - java.lang.String getArg(int index); - /** - * repeated string arg = 3; - * - *
-     * Arguments passed to this func/op.
-     * arg[i] must be either one of
-     * function.signature.input_args[*].name or one of
-     * function.node[*].ret[*].
-     * REQUIRES: arg.size == func/op def's number of input args.
-     * 
- */ - com.google.protobuf.ByteString - getArgBytes(int index); - - /** - * repeated string dep = 4; - * - *
-     * Control dependencies.
-     * dep[i] must be one of function.node[*].ret[*] or one of
-     * function.signature.input_args[*].name.
-     * 
- */ - com.google.protobuf.ProtocolStringList - getDepList(); - /** - * repeated string dep = 4; - * - *
-     * Control dependencies.
-     * dep[i] must be one of function.node[*].ret[*] or one of
-     * function.signature.input_args[*].name.
-     * 
- */ - int getDepCount(); - /** - * repeated string dep = 4; - * - *
-     * Control dependencies.
-     * dep[i] must be one of function.node[*].ret[*] or one of
-     * function.signature.input_args[*].name.
-     * 
- */ - java.lang.String getDep(int index); - /** - * repeated string dep = 4; - * - *
-     * Control dependencies.
-     * dep[i] must be one of function.node[*].ret[*] or one of
-     * function.signature.input_args[*].name.
-     * 
- */ - com.google.protobuf.ByteString - getDepBytes(int index); - - /** - * map<string, .tensorflow.AttrValue> attr = 5; - * - *
-     * Attrs.
-     * 'attr' maps names defined by 'func's attr defs to attr values.
-     * attr values may have placeholders which are substituted
-     * recursively by concrete values when this node is instantiated.
-     * These placeholders must name an attr listed in the FunctionDef's
-     * signature.
-     * 
- */ - java.util.Map - getAttr(); - } - /** - * Protobuf type {@code tensorflow.FunctionDef.Node} - * - *
-   * A node is a multi-value assignment:
-   *   (ret[0], ret[1], ...) = func(arg[0], arg[1], ...)
-   * By convention, "func" is resolved by consulting with a user-defined
-   * library first. If not resolved, "func" is assumed to be a builtin op.
-   * 
- */ - public static final class Node extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.FunctionDef.Node) - NodeOrBuilder { - // Use Node.newBuilder() to construct. - private Node(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Node() { - ret_ = com.google.protobuf.LazyStringArrayList.EMPTY; - op_ = ""; - arg_ = com.google.protobuf.LazyStringArrayList.EMPTY; - dep_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Node( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - ret_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - ret_.add(s); - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - op_ = s; - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - arg_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - arg_.add(s); - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - dep_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - dep_.add(s); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - attr_ = com.google.protobuf.MapField.newMapField( - AttrDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000010; - } - com.google.protobuf.MapEntry - attr = input.readMessage( - AttrDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - attr_.getMutableMap().put(attr.getKey(), attr.getValue()); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - ret_ = ret_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - arg_ = arg_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - dep_ = dep_.getUnmodifiableView(); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_Node_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 5: - return internalGetAttr(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_Node_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.FunctionDef.Node.class, org.tensorflow.framework.FunctionDef.Node.Builder.class); - } - - private int bitField0_; - public static final int RET_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList ret_; - /** - * repeated string ret = 1; - * - *
-     * This node produces multiple outputs. They are named ret[0],
-     * ret[1], ..., etc.
-     * REQUIRES: function.node.ret[*] are unique across all nodes.
-     * REQUIRES: ret.size == func/op def's number of output args.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getRetList() { - return ret_; - } - /** - * repeated string ret = 1; - * - *
-     * This node produces multiple outputs. They are named ret[0],
-     * ret[1], ..., etc.
-     * REQUIRES: function.node.ret[*] are unique across all nodes.
-     * REQUIRES: ret.size == func/op def's number of output args.
-     * 
- */ - public int getRetCount() { - return ret_.size(); - } - /** - * repeated string ret = 1; - * - *
-     * This node produces multiple outputs. They are named ret[0],
-     * ret[1], ..., etc.
-     * REQUIRES: function.node.ret[*] are unique across all nodes.
-     * REQUIRES: ret.size == func/op def's number of output args.
-     * 
- */ - public java.lang.String getRet(int index) { - return ret_.get(index); - } - /** - * repeated string ret = 1; - * - *
-     * This node produces multiple outputs. They are named ret[0],
-     * ret[1], ..., etc.
-     * REQUIRES: function.node.ret[*] are unique across all nodes.
-     * REQUIRES: ret.size == func/op def's number of output args.
-     * 
- */ - public com.google.protobuf.ByteString - getRetBytes(int index) { - return ret_.getByteString(index); - } - - public static final int OP_FIELD_NUMBER = 2; - private volatile java.lang.Object op_; - /** - * optional string op = 2; - * - *
-     * The op/function name.
-     * 
- */ - public java.lang.String getOp() { - java.lang.Object ref = op_; - 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(); - op_ = s; - return s; - } - } - /** - * optional string op = 2; - * - *
-     * The op/function name.
-     * 
- */ - public com.google.protobuf.ByteString - getOpBytes() { - java.lang.Object ref = op_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - op_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARG_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList arg_; - /** - * repeated string arg = 3; - * - *
-     * Arguments passed to this func/op.
-     * arg[i] must be either one of
-     * function.signature.input_args[*].name or one of
-     * function.node[*].ret[*].
-     * REQUIRES: arg.size == func/op def's number of input args.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getArgList() { - return arg_; - } - /** - * repeated string arg = 3; - * - *
-     * Arguments passed to this func/op.
-     * arg[i] must be either one of
-     * function.signature.input_args[*].name or one of
-     * function.node[*].ret[*].
-     * REQUIRES: arg.size == func/op def's number of input args.
-     * 
- */ - public int getArgCount() { - return arg_.size(); - } - /** - * repeated string arg = 3; - * - *
-     * Arguments passed to this func/op.
-     * arg[i] must be either one of
-     * function.signature.input_args[*].name or one of
-     * function.node[*].ret[*].
-     * REQUIRES: arg.size == func/op def's number of input args.
-     * 
- */ - public java.lang.String getArg(int index) { - return arg_.get(index); - } - /** - * repeated string arg = 3; - * - *
-     * Arguments passed to this func/op.
-     * arg[i] must be either one of
-     * function.signature.input_args[*].name or one of
-     * function.node[*].ret[*].
-     * REQUIRES: arg.size == func/op def's number of input args.
-     * 
- */ - public com.google.protobuf.ByteString - getArgBytes(int index) { - return arg_.getByteString(index); - } - - public static final int DEP_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList dep_; - /** - * repeated string dep = 4; - * - *
-     * Control dependencies.
-     * dep[i] must be one of function.node[*].ret[*] or one of
-     * function.signature.input_args[*].name.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getDepList() { - return dep_; - } - /** - * repeated string dep = 4; - * - *
-     * Control dependencies.
-     * dep[i] must be one of function.node[*].ret[*] or one of
-     * function.signature.input_args[*].name.
-     * 
- */ - public int getDepCount() { - return dep_.size(); - } - /** - * repeated string dep = 4; - * - *
-     * Control dependencies.
-     * dep[i] must be one of function.node[*].ret[*] or one of
-     * function.signature.input_args[*].name.
-     * 
- */ - public java.lang.String getDep(int index) { - return dep_.get(index); - } - /** - * repeated string dep = 4; - * - *
-     * Control dependencies.
-     * dep[i] must be one of function.node[*].ret[*] or one of
-     * function.signature.input_args[*].name.
-     * 
- */ - public com.google.protobuf.ByteString - getDepBytes(int index) { - return dep_.getByteString(index); - } - - public static final int ATTR_FIELD_NUMBER = 5; - private static final class AttrDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, org.tensorflow.framework.AttrValue> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_Node_AttrEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - org.tensorflow.framework.AttrValue.getDefaultInstance()); - } - private com.google.protobuf.MapField< - java.lang.String, org.tensorflow.framework.AttrValue> attr_; - private com.google.protobuf.MapField - internalGetAttr() { - if (attr_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttrDefaultEntryHolder.defaultEntry); - } - return attr_; - } - /** - * map<string, .tensorflow.AttrValue> attr = 5; - * - *
-     * Attrs.
-     * 'attr' maps names defined by 'func's attr defs to attr values.
-     * attr values may have placeholders which are substituted
-     * recursively by concrete values when this node is instantiated.
-     * These placeholders must name an attr listed in the FunctionDef's
-     * signature.
-     * 
- */ - - public java.util.Map getAttr() { - return internalGetAttr().getMap(); - } - - 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 { - for (int i = 0; i < ret_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, ret_.getRaw(i)); - } - if (!getOpBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, op_); - } - for (int i = 0; i < arg_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, arg_.getRaw(i)); - } - for (int i = 0; i < dep_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, dep_.getRaw(i)); - } - for (java.util.Map.Entry entry - : internalGetAttr().getMap().entrySet()) { - com.google.protobuf.MapEntry - attr = AttrDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - output.writeMessage(5, attr); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < ret_.size(); i++) { - dataSize += computeStringSizeNoTag(ret_.getRaw(i)); - } - size += dataSize; - size += 1 * getRetList().size(); - } - if (!getOpBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, op_); - } - { - int dataSize = 0; - for (int i = 0; i < arg_.size(); i++) { - dataSize += computeStringSizeNoTag(arg_.getRaw(i)); - } - size += dataSize; - size += 1 * getArgList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < dep_.size(); i++) { - dataSize += computeStringSizeNoTag(dep_.getRaw(i)); - } - size += dataSize; - size += 1 * getDepList().size(); - } - for (java.util.Map.Entry entry - : internalGetAttr().getMap().entrySet()) { - com.google.protobuf.MapEntry - attr = AttrDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, attr); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.FunctionDef.Node parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.FunctionDef.Node 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.FunctionDef.Node parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.FunctionDef.Node parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.FunctionDef.Node parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.FunctionDef.Node parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.FunctionDef.Node parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.FunctionDef.Node parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.FunctionDef.Node parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.FunctionDef.Node parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.FunctionDef.Node 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.FunctionDef.Node} - * - *
-     * A node is a multi-value assignment:
-     *   (ret[0], ret[1], ...) = func(arg[0], arg[1], ...)
-     * By convention, "func" is resolved by consulting with a user-defined
-     * library first. If not resolved, "func" is assumed to be a builtin op.
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.FunctionDef.Node) - org.tensorflow.framework.FunctionDef.NodeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_Node_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 5: - return internalGetAttr(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 5: - return internalGetMutableAttr(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_Node_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.FunctionDef.Node.class, org.tensorflow.framework.FunctionDef.Node.Builder.class); - } - - // Construct using org.tensorflow.framework.FunctionDef.Node.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - ret_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - op_ = ""; - - arg_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - dep_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - internalGetMutableAttr().clear(); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_Node_descriptor; - } - - public org.tensorflow.framework.FunctionDef.Node getDefaultInstanceForType() { - return org.tensorflow.framework.FunctionDef.Node.getDefaultInstance(); - } - - public org.tensorflow.framework.FunctionDef.Node build() { - org.tensorflow.framework.FunctionDef.Node result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.FunctionDef.Node buildPartial() { - org.tensorflow.framework.FunctionDef.Node result = new org.tensorflow.framework.FunctionDef.Node(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - ret_ = ret_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.ret_ = ret_; - result.op_ = op_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - arg_ = arg_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.arg_ = arg_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - dep_ = dep_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.dep_ = dep_; - result.attr_ = internalGetAttr(); - result.attr_.makeImmutable(); - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.FunctionDef.Node) { - return mergeFrom((org.tensorflow.framework.FunctionDef.Node)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.FunctionDef.Node other) { - if (other == org.tensorflow.framework.FunctionDef.Node.getDefaultInstance()) return this; - if (!other.ret_.isEmpty()) { - if (ret_.isEmpty()) { - ret_ = other.ret_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRetIsMutable(); - ret_.addAll(other.ret_); - } - onChanged(); - } - if (!other.getOp().isEmpty()) { - op_ = other.op_; - onChanged(); - } - if (!other.arg_.isEmpty()) { - if (arg_.isEmpty()) { - arg_ = other.arg_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureArgIsMutable(); - arg_.addAll(other.arg_); - } - onChanged(); - } - if (!other.dep_.isEmpty()) { - if (dep_.isEmpty()) { - dep_ = other.dep_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureDepIsMutable(); - dep_.addAll(other.dep_); - } - onChanged(); - } - internalGetMutableAttr().mergeFrom( - other.internalGetAttr()); - 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.FunctionDef.Node parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.FunctionDef.Node) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList ret_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureRetIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - ret_ = new com.google.protobuf.LazyStringArrayList(ret_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated string ret = 1; - * - *
-       * This node produces multiple outputs. They are named ret[0],
-       * ret[1], ..., etc.
-       * REQUIRES: function.node.ret[*] are unique across all nodes.
-       * REQUIRES: ret.size == func/op def's number of output args.
-       * 
- */ - public com.google.protobuf.ProtocolStringList - getRetList() { - return ret_.getUnmodifiableView(); - } - /** - * repeated string ret = 1; - * - *
-       * This node produces multiple outputs. They are named ret[0],
-       * ret[1], ..., etc.
-       * REQUIRES: function.node.ret[*] are unique across all nodes.
-       * REQUIRES: ret.size == func/op def's number of output args.
-       * 
- */ - public int getRetCount() { - return ret_.size(); - } - /** - * repeated string ret = 1; - * - *
-       * This node produces multiple outputs. They are named ret[0],
-       * ret[1], ..., etc.
-       * REQUIRES: function.node.ret[*] are unique across all nodes.
-       * REQUIRES: ret.size == func/op def's number of output args.
-       * 
- */ - public java.lang.String getRet(int index) { - return ret_.get(index); - } - /** - * repeated string ret = 1; - * - *
-       * This node produces multiple outputs. They are named ret[0],
-       * ret[1], ..., etc.
-       * REQUIRES: function.node.ret[*] are unique across all nodes.
-       * REQUIRES: ret.size == func/op def's number of output args.
-       * 
- */ - public com.google.protobuf.ByteString - getRetBytes(int index) { - return ret_.getByteString(index); - } - /** - * repeated string ret = 1; - * - *
-       * This node produces multiple outputs. They are named ret[0],
-       * ret[1], ..., etc.
-       * REQUIRES: function.node.ret[*] are unique across all nodes.
-       * REQUIRES: ret.size == func/op def's number of output args.
-       * 
- */ - public Builder setRet( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRetIsMutable(); - ret_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string ret = 1; - * - *
-       * This node produces multiple outputs. They are named ret[0],
-       * ret[1], ..., etc.
-       * REQUIRES: function.node.ret[*] are unique across all nodes.
-       * REQUIRES: ret.size == func/op def's number of output args.
-       * 
- */ - public Builder addRet( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRetIsMutable(); - ret_.add(value); - onChanged(); - return this; - } - /** - * repeated string ret = 1; - * - *
-       * This node produces multiple outputs. They are named ret[0],
-       * ret[1], ..., etc.
-       * REQUIRES: function.node.ret[*] are unique across all nodes.
-       * REQUIRES: ret.size == func/op def's number of output args.
-       * 
- */ - public Builder addAllRet( - java.lang.Iterable values) { - ensureRetIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ret_); - onChanged(); - return this; - } - /** - * repeated string ret = 1; - * - *
-       * This node produces multiple outputs. They are named ret[0],
-       * ret[1], ..., etc.
-       * REQUIRES: function.node.ret[*] are unique across all nodes.
-       * REQUIRES: ret.size == func/op def's number of output args.
-       * 
- */ - public Builder clearRet() { - ret_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated string ret = 1; - * - *
-       * This node produces multiple outputs. They are named ret[0],
-       * ret[1], ..., etc.
-       * REQUIRES: function.node.ret[*] are unique across all nodes.
-       * REQUIRES: ret.size == func/op def's number of output args.
-       * 
- */ - public Builder addRetBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRetIsMutable(); - ret_.add(value); - onChanged(); - return this; - } - - private java.lang.Object op_ = ""; - /** - * optional string op = 2; - * - *
-       * The op/function name.
-       * 
- */ - public java.lang.String getOp() { - java.lang.Object ref = op_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - op_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string op = 2; - * - *
-       * The op/function name.
-       * 
- */ - public com.google.protobuf.ByteString - getOpBytes() { - java.lang.Object ref = op_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - op_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string op = 2; - * - *
-       * The op/function name.
-       * 
- */ - public Builder setOp( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - op_ = value; - onChanged(); - return this; - } - /** - * optional string op = 2; - * - *
-       * The op/function name.
-       * 
- */ - public Builder clearOp() { - - op_ = getDefaultInstance().getOp(); - onChanged(); - return this; - } - /** - * optional string op = 2; - * - *
-       * The op/function name.
-       * 
- */ - public Builder setOpBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - op_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList arg_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureArgIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - arg_ = new com.google.protobuf.LazyStringArrayList(arg_); - bitField0_ |= 0x00000004; - } - } - /** - * repeated string arg = 3; - * - *
-       * Arguments passed to this func/op.
-       * arg[i] must be either one of
-       * function.signature.input_args[*].name or one of
-       * function.node[*].ret[*].
-       * REQUIRES: arg.size == func/op def's number of input args.
-       * 
- */ - public com.google.protobuf.ProtocolStringList - getArgList() { - return arg_.getUnmodifiableView(); - } - /** - * repeated string arg = 3; - * - *
-       * Arguments passed to this func/op.
-       * arg[i] must be either one of
-       * function.signature.input_args[*].name or one of
-       * function.node[*].ret[*].
-       * REQUIRES: arg.size == func/op def's number of input args.
-       * 
- */ - public int getArgCount() { - return arg_.size(); - } - /** - * repeated string arg = 3; - * - *
-       * Arguments passed to this func/op.
-       * arg[i] must be either one of
-       * function.signature.input_args[*].name or one of
-       * function.node[*].ret[*].
-       * REQUIRES: arg.size == func/op def's number of input args.
-       * 
- */ - public java.lang.String getArg(int index) { - return arg_.get(index); - } - /** - * repeated string arg = 3; - * - *
-       * Arguments passed to this func/op.
-       * arg[i] must be either one of
-       * function.signature.input_args[*].name or one of
-       * function.node[*].ret[*].
-       * REQUIRES: arg.size == func/op def's number of input args.
-       * 
- */ - public com.google.protobuf.ByteString - getArgBytes(int index) { - return arg_.getByteString(index); - } - /** - * repeated string arg = 3; - * - *
-       * Arguments passed to this func/op.
-       * arg[i] must be either one of
-       * function.signature.input_args[*].name or one of
-       * function.node[*].ret[*].
-       * REQUIRES: arg.size == func/op def's number of input args.
-       * 
- */ - public Builder setArg( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgIsMutable(); - arg_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string arg = 3; - * - *
-       * Arguments passed to this func/op.
-       * arg[i] must be either one of
-       * function.signature.input_args[*].name or one of
-       * function.node[*].ret[*].
-       * REQUIRES: arg.size == func/op def's number of input args.
-       * 
- */ - public Builder addArg( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgIsMutable(); - arg_.add(value); - onChanged(); - return this; - } - /** - * repeated string arg = 3; - * - *
-       * Arguments passed to this func/op.
-       * arg[i] must be either one of
-       * function.signature.input_args[*].name or one of
-       * function.node[*].ret[*].
-       * REQUIRES: arg.size == func/op def's number of input args.
-       * 
- */ - public Builder addAllArg( - java.lang.Iterable values) { - ensureArgIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, arg_); - onChanged(); - return this; - } - /** - * repeated string arg = 3; - * - *
-       * Arguments passed to this func/op.
-       * arg[i] must be either one of
-       * function.signature.input_args[*].name or one of
-       * function.node[*].ret[*].
-       * REQUIRES: arg.size == func/op def's number of input args.
-       * 
- */ - public Builder clearArg() { - arg_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * repeated string arg = 3; - * - *
-       * Arguments passed to this func/op.
-       * arg[i] must be either one of
-       * function.signature.input_args[*].name or one of
-       * function.node[*].ret[*].
-       * REQUIRES: arg.size == func/op def's number of input args.
-       * 
- */ - public Builder addArgBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureArgIsMutable(); - arg_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList dep_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureDepIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - dep_ = new com.google.protobuf.LazyStringArrayList(dep_); - bitField0_ |= 0x00000008; - } - } - /** - * repeated string dep = 4; - * - *
-       * Control dependencies.
-       * dep[i] must be one of function.node[*].ret[*] or one of
-       * function.signature.input_args[*].name.
-       * 
- */ - public com.google.protobuf.ProtocolStringList - getDepList() { - return dep_.getUnmodifiableView(); - } - /** - * repeated string dep = 4; - * - *
-       * Control dependencies.
-       * dep[i] must be one of function.node[*].ret[*] or one of
-       * function.signature.input_args[*].name.
-       * 
- */ - public int getDepCount() { - return dep_.size(); - } - /** - * repeated string dep = 4; - * - *
-       * Control dependencies.
-       * dep[i] must be one of function.node[*].ret[*] or one of
-       * function.signature.input_args[*].name.
-       * 
- */ - public java.lang.String getDep(int index) { - return dep_.get(index); - } - /** - * repeated string dep = 4; - * - *
-       * Control dependencies.
-       * dep[i] must be one of function.node[*].ret[*] or one of
-       * function.signature.input_args[*].name.
-       * 
- */ - public com.google.protobuf.ByteString - getDepBytes(int index) { - return dep_.getByteString(index); - } - /** - * repeated string dep = 4; - * - *
-       * Control dependencies.
-       * dep[i] must be one of function.node[*].ret[*] or one of
-       * function.signature.input_args[*].name.
-       * 
- */ - public Builder setDep( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDepIsMutable(); - dep_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string dep = 4; - * - *
-       * Control dependencies.
-       * dep[i] must be one of function.node[*].ret[*] or one of
-       * function.signature.input_args[*].name.
-       * 
- */ - public Builder addDep( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDepIsMutable(); - dep_.add(value); - onChanged(); - return this; - } - /** - * repeated string dep = 4; - * - *
-       * Control dependencies.
-       * dep[i] must be one of function.node[*].ret[*] or one of
-       * function.signature.input_args[*].name.
-       * 
- */ - public Builder addAllDep( - java.lang.Iterable values) { - ensureDepIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, dep_); - onChanged(); - return this; - } - /** - * repeated string dep = 4; - * - *
-       * Control dependencies.
-       * dep[i] must be one of function.node[*].ret[*] or one of
-       * function.signature.input_args[*].name.
-       * 
- */ - public Builder clearDep() { - dep_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * repeated string dep = 4; - * - *
-       * Control dependencies.
-       * dep[i] must be one of function.node[*].ret[*] or one of
-       * function.signature.input_args[*].name.
-       * 
- */ - public Builder addDepBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureDepIsMutable(); - dep_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, org.tensorflow.framework.AttrValue> attr_; - private com.google.protobuf.MapField - internalGetAttr() { - if (attr_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttrDefaultEntryHolder.defaultEntry); - } - return attr_; - } - private com.google.protobuf.MapField - internalGetMutableAttr() { - onChanged();; - if (attr_ == null) { - attr_ = com.google.protobuf.MapField.newMapField( - AttrDefaultEntryHolder.defaultEntry); - } - if (!attr_.isMutable()) { - attr_ = attr_.copy(); - } - return attr_; - } - /** - * map<string, .tensorflow.AttrValue> attr = 5; - * - *
-       * Attrs.
-       * 'attr' maps names defined by 'func's attr defs to attr values.
-       * attr values may have placeholders which are substituted
-       * recursively by concrete values when this node is instantiated.
-       * These placeholders must name an attr listed in the FunctionDef's
-       * signature.
-       * 
- */ - public java.util.Map getAttr() { - return internalGetAttr().getMap(); - } - /** - * map<string, .tensorflow.AttrValue> attr = 5; - * - *
-       * Attrs.
-       * 'attr' maps names defined by 'func's attr defs to attr values.
-       * attr values may have placeholders which are substituted
-       * recursively by concrete values when this node is instantiated.
-       * These placeholders must name an attr listed in the FunctionDef's
-       * signature.
-       * 
- */ - public java.util.Map - getMutableAttr() { - return internalGetMutableAttr().getMutableMap(); - } - /** - * map<string, .tensorflow.AttrValue> attr = 5; - * - *
-       * Attrs.
-       * 'attr' maps names defined by 'func's attr defs to attr values.
-       * attr values may have placeholders which are substituted
-       * recursively by concrete values when this node is instantiated.
-       * These placeholders must name an attr listed in the FunctionDef's
-       * signature.
-       * 
- */ - public Builder putAllAttr( - java.util.Map values) { - getMutableAttr().putAll(values); - 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.FunctionDef.Node) - } - - // @@protoc_insertion_point(class_scope:tensorflow.FunctionDef.Node) - private static final org.tensorflow.framework.FunctionDef.Node DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.FunctionDef.Node(); - } - - public static org.tensorflow.framework.FunctionDef.Node getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Node parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Node(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.FunctionDef.Node getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int SIGNATURE_FIELD_NUMBER = 1; - private org.tensorflow.framework.OpDef signature_; - /** - * optional .tensorflow.OpDef signature = 1; - * - *
-   * The definition of the function's name, arguments, return values,
-   * attrs etc.
-   * 
- */ - public boolean hasSignature() { - return signature_ != null; - } - /** - * optional .tensorflow.OpDef signature = 1; - * - *
-   * The definition of the function's name, arguments, return values,
-   * attrs etc.
-   * 
- */ - public org.tensorflow.framework.OpDef getSignature() { - return signature_ == null ? org.tensorflow.framework.OpDef.getDefaultInstance() : signature_; - } - /** - * optional .tensorflow.OpDef signature = 1; - * - *
-   * The definition of the function's name, arguments, return values,
-   * attrs etc.
-   * 
- */ - public org.tensorflow.framework.OpDefOrBuilder getSignatureOrBuilder() { - return getSignature(); - } - - public static final int NODE_FIELD_NUMBER = 2; - private java.util.List node_; - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-   * The body of the function.
-   * 
- */ - public java.util.List getNodeList() { - return node_; - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-   * The body of the function.
-   * 
- */ - public java.util.List - getNodeOrBuilderList() { - return node_; - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-   * The body of the function.
-   * 
- */ - public int getNodeCount() { - return node_.size(); - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-   * The body of the function.
-   * 
- */ - public org.tensorflow.framework.FunctionDef.Node getNode(int index) { - return node_.get(index); - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-   * The body of the function.
-   * 
- */ - public org.tensorflow.framework.FunctionDef.NodeOrBuilder getNodeOrBuilder( - int index) { - return node_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (signature_ != null) { - output.writeMessage(1, getSignature()); - } - for (int i = 0; i < node_.size(); i++) { - output.writeMessage(2, node_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (signature_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSignature()); - } - for (int i = 0; i < node_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, node_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.FunctionDef parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.FunctionDef 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.FunctionDef parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.FunctionDef parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.FunctionDef parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.FunctionDef parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.FunctionDef parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.FunctionDef parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.FunctionDef parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.FunctionDef parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.FunctionDef 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.FunctionDef} - * - *
-   * A function can be instantiated when the runtime can bind every attr
-   * with a value. When a GraphDef has a call to a function, it must
-   * have binding for every attr defined in the signature.
-   * TODO(zhifengc):
-   *   * device spec, etc.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.FunctionDef) - org.tensorflow.framework.FunctionDefOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.FunctionDef.class, org.tensorflow.framework.FunctionDef.Builder.class); - } - - // Construct using org.tensorflow.framework.FunctionDef.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getNodeFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (signatureBuilder_ == null) { - signature_ = null; - } else { - signature_ = null; - signatureBuilder_ = null; - } - if (nodeBuilder_ == null) { - node_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - nodeBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDef_descriptor; - } - - public org.tensorflow.framework.FunctionDef getDefaultInstanceForType() { - return org.tensorflow.framework.FunctionDef.getDefaultInstance(); - } - - public org.tensorflow.framework.FunctionDef build() { - org.tensorflow.framework.FunctionDef result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.FunctionDef buildPartial() { - org.tensorflow.framework.FunctionDef result = new org.tensorflow.framework.FunctionDef(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (signatureBuilder_ == null) { - result.signature_ = signature_; - } else { - result.signature_ = signatureBuilder_.build(); - } - if (nodeBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - node_ = java.util.Collections.unmodifiableList(node_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.node_ = node_; - } else { - result.node_ = nodeBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.FunctionDef) { - return mergeFrom((org.tensorflow.framework.FunctionDef)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.FunctionDef other) { - if (other == org.tensorflow.framework.FunctionDef.getDefaultInstance()) return this; - if (other.hasSignature()) { - mergeSignature(other.getSignature()); - } - if (nodeBuilder_ == null) { - if (!other.node_.isEmpty()) { - if (node_.isEmpty()) { - node_ = other.node_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureNodeIsMutable(); - node_.addAll(other.node_); - } - onChanged(); - } - } else { - if (!other.node_.isEmpty()) { - if (nodeBuilder_.isEmpty()) { - nodeBuilder_.dispose(); - nodeBuilder_ = null; - node_ = other.node_; - bitField0_ = (bitField0_ & ~0x00000002); - nodeBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getNodeFieldBuilder() : null; - } else { - nodeBuilder_.addAllMessages(other.node_); - } - } - } - 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.FunctionDef parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.FunctionDef) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private org.tensorflow.framework.OpDef signature_ = null; - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.OpDef, org.tensorflow.framework.OpDef.Builder, org.tensorflow.framework.OpDefOrBuilder> signatureBuilder_; - /** - * optional .tensorflow.OpDef signature = 1; - * - *
-     * The definition of the function's name, arguments, return values,
-     * attrs etc.
-     * 
- */ - public boolean hasSignature() { - return signatureBuilder_ != null || signature_ != null; - } - /** - * optional .tensorflow.OpDef signature = 1; - * - *
-     * The definition of the function's name, arguments, return values,
-     * attrs etc.
-     * 
- */ - public org.tensorflow.framework.OpDef getSignature() { - if (signatureBuilder_ == null) { - return signature_ == null ? org.tensorflow.framework.OpDef.getDefaultInstance() : signature_; - } else { - return signatureBuilder_.getMessage(); - } - } - /** - * optional .tensorflow.OpDef signature = 1; - * - *
-     * The definition of the function's name, arguments, return values,
-     * attrs etc.
-     * 
- */ - public Builder setSignature(org.tensorflow.framework.OpDef value) { - if (signatureBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - signature_ = value; - onChanged(); - } else { - signatureBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .tensorflow.OpDef signature = 1; - * - *
-     * The definition of the function's name, arguments, return values,
-     * attrs etc.
-     * 
- */ - public Builder setSignature( - org.tensorflow.framework.OpDef.Builder builderForValue) { - if (signatureBuilder_ == null) { - signature_ = builderForValue.build(); - onChanged(); - } else { - signatureBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .tensorflow.OpDef signature = 1; - * - *
-     * The definition of the function's name, arguments, return values,
-     * attrs etc.
-     * 
- */ - public Builder mergeSignature(org.tensorflow.framework.OpDef value) { - if (signatureBuilder_ == null) { - if (signature_ != null) { - signature_ = - org.tensorflow.framework.OpDef.newBuilder(signature_).mergeFrom(value).buildPartial(); - } else { - signature_ = value; - } - onChanged(); - } else { - signatureBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .tensorflow.OpDef signature = 1; - * - *
-     * The definition of the function's name, arguments, return values,
-     * attrs etc.
-     * 
- */ - public Builder clearSignature() { - if (signatureBuilder_ == null) { - signature_ = null; - onChanged(); - } else { - signature_ = null; - signatureBuilder_ = null; - } - - return this; - } - /** - * optional .tensorflow.OpDef signature = 1; - * - *
-     * The definition of the function's name, arguments, return values,
-     * attrs etc.
-     * 
- */ - public org.tensorflow.framework.OpDef.Builder getSignatureBuilder() { - - onChanged(); - return getSignatureFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.OpDef signature = 1; - * - *
-     * The definition of the function's name, arguments, return values,
-     * attrs etc.
-     * 
- */ - public org.tensorflow.framework.OpDefOrBuilder getSignatureOrBuilder() { - if (signatureBuilder_ != null) { - return signatureBuilder_.getMessageOrBuilder(); - } else { - return signature_ == null ? - org.tensorflow.framework.OpDef.getDefaultInstance() : signature_; - } - } - /** - * optional .tensorflow.OpDef signature = 1; - * - *
-     * The definition of the function's name, arguments, return values,
-     * attrs etc.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.OpDef, org.tensorflow.framework.OpDef.Builder, org.tensorflow.framework.OpDefOrBuilder> - getSignatureFieldBuilder() { - if (signatureBuilder_ == null) { - signatureBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.OpDef, org.tensorflow.framework.OpDef.Builder, org.tensorflow.framework.OpDefOrBuilder>( - getSignature(), - getParentForChildren(), - isClean()); - signature_ = null; - } - return signatureBuilder_; - } - - private java.util.List node_ = - java.util.Collections.emptyList(); - private void ensureNodeIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - node_ = new java.util.ArrayList(node_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.FunctionDef.Node, org.tensorflow.framework.FunctionDef.Node.Builder, org.tensorflow.framework.FunctionDef.NodeOrBuilder> nodeBuilder_; - - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public java.util.List getNodeList() { - if (nodeBuilder_ == null) { - return java.util.Collections.unmodifiableList(node_); - } else { - return nodeBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public int getNodeCount() { - if (nodeBuilder_ == null) { - return node_.size(); - } else { - return nodeBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public org.tensorflow.framework.FunctionDef.Node getNode(int index) { - if (nodeBuilder_ == null) { - return node_.get(index); - } else { - return nodeBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public Builder setNode( - int index, org.tensorflow.framework.FunctionDef.Node value) { - if (nodeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodeIsMutable(); - node_.set(index, value); - onChanged(); - } else { - nodeBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public Builder setNode( - int index, org.tensorflow.framework.FunctionDef.Node.Builder builderForValue) { - if (nodeBuilder_ == null) { - ensureNodeIsMutable(); - node_.set(index, builderForValue.build()); - onChanged(); - } else { - nodeBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public Builder addNode(org.tensorflow.framework.FunctionDef.Node value) { - if (nodeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodeIsMutable(); - node_.add(value); - onChanged(); - } else { - nodeBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public Builder addNode( - int index, org.tensorflow.framework.FunctionDef.Node value) { - if (nodeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodeIsMutable(); - node_.add(index, value); - onChanged(); - } else { - nodeBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public Builder addNode( - org.tensorflow.framework.FunctionDef.Node.Builder builderForValue) { - if (nodeBuilder_ == null) { - ensureNodeIsMutable(); - node_.add(builderForValue.build()); - onChanged(); - } else { - nodeBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public Builder addNode( - int index, org.tensorflow.framework.FunctionDef.Node.Builder builderForValue) { - if (nodeBuilder_ == null) { - ensureNodeIsMutable(); - node_.add(index, builderForValue.build()); - onChanged(); - } else { - nodeBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public Builder addAllNode( - java.lang.Iterable values) { - if (nodeBuilder_ == null) { - ensureNodeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, node_); - onChanged(); - } else { - nodeBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public Builder clearNode() { - if (nodeBuilder_ == null) { - node_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - nodeBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public Builder removeNode(int index) { - if (nodeBuilder_ == null) { - ensureNodeIsMutable(); - node_.remove(index); - onChanged(); - } else { - nodeBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public org.tensorflow.framework.FunctionDef.Node.Builder getNodeBuilder( - int index) { - return getNodeFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public org.tensorflow.framework.FunctionDef.NodeOrBuilder getNodeOrBuilder( - int index) { - if (nodeBuilder_ == null) { - return node_.get(index); } else { - return nodeBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public java.util.List - getNodeOrBuilderList() { - if (nodeBuilder_ != null) { - return nodeBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(node_); - } - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public org.tensorflow.framework.FunctionDef.Node.Builder addNodeBuilder() { - return getNodeFieldBuilder().addBuilder( - org.tensorflow.framework.FunctionDef.Node.getDefaultInstance()); - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public org.tensorflow.framework.FunctionDef.Node.Builder addNodeBuilder( - int index) { - return getNodeFieldBuilder().addBuilder( - index, org.tensorflow.framework.FunctionDef.Node.getDefaultInstance()); - } - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-     * The body of the function.
-     * 
- */ - public java.util.List - getNodeBuilderList() { - return getNodeFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.FunctionDef.Node, org.tensorflow.framework.FunctionDef.Node.Builder, org.tensorflow.framework.FunctionDef.NodeOrBuilder> - getNodeFieldBuilder() { - if (nodeBuilder_ == null) { - nodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.FunctionDef.Node, org.tensorflow.framework.FunctionDef.Node.Builder, org.tensorflow.framework.FunctionDef.NodeOrBuilder>( - node_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - node_ = null; - } - return nodeBuilder_; - } - 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.FunctionDef) - } - - // @@protoc_insertion_point(class_scope:tensorflow.FunctionDef) - private static final org.tensorflow.framework.FunctionDef DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.FunctionDef(); - } - - public static org.tensorflow.framework.FunctionDef getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public FunctionDef parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new FunctionDef(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.FunctionDef getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/FunctionDefLibrary.java b/src/main/java/org/tensorflow/framework/FunctionDefLibrary.java deleted file mode 100644 index 7739b2d..0000000 --- a/src/main/java/org/tensorflow/framework/FunctionDefLibrary.java +++ /dev/null @@ -1,663 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/function.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.FunctionDefLibrary} - * - *
- * A library is a set of named functions.
- * 
- */ -public final class FunctionDefLibrary extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.FunctionDefLibrary) - FunctionDefLibraryOrBuilder { - // Use FunctionDefLibrary.newBuilder() to construct. - private FunctionDefLibrary(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FunctionDefLibrary() { - function_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private FunctionDefLibrary( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - function_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - function_.add(input.readMessage(org.tensorflow.framework.FunctionDef.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - function_ = java.util.Collections.unmodifiableList(function_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.FunctionDefLibrary.class, org.tensorflow.framework.FunctionDefLibrary.Builder.class); - } - - public static final int FUNCTION_FIELD_NUMBER = 1; - private java.util.List function_; - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public java.util.List getFunctionList() { - return function_; - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public java.util.List - getFunctionOrBuilderList() { - return function_; - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public int getFunctionCount() { - return function_.size(); - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public org.tensorflow.framework.FunctionDef getFunction(int index) { - return function_.get(index); - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public org.tensorflow.framework.FunctionDefOrBuilder getFunctionOrBuilder( - int index) { - return function_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < function_.size(); i++) { - output.writeMessage(1, function_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < function_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, function_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.FunctionDefLibrary parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.FunctionDefLibrary 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.FunctionDefLibrary parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.FunctionDefLibrary parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.FunctionDefLibrary parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.FunctionDefLibrary parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.FunctionDefLibrary parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.FunctionDefLibrary parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.FunctionDefLibrary parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.FunctionDefLibrary parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.FunctionDefLibrary 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.FunctionDefLibrary} - * - *
-   * A library is a set of named functions.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.FunctionDefLibrary) - org.tensorflow.framework.FunctionDefLibraryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.FunctionDefLibrary.class, org.tensorflow.framework.FunctionDefLibrary.Builder.class); - } - - // Construct using org.tensorflow.framework.FunctionDefLibrary.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getFunctionFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (functionBuilder_ == null) { - function_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - functionBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_descriptor; - } - - public org.tensorflow.framework.FunctionDefLibrary getDefaultInstanceForType() { - return org.tensorflow.framework.FunctionDefLibrary.getDefaultInstance(); - } - - public org.tensorflow.framework.FunctionDefLibrary build() { - org.tensorflow.framework.FunctionDefLibrary result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.FunctionDefLibrary buildPartial() { - org.tensorflow.framework.FunctionDefLibrary result = new org.tensorflow.framework.FunctionDefLibrary(this); - int from_bitField0_ = bitField0_; - if (functionBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - function_ = java.util.Collections.unmodifiableList(function_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.function_ = function_; - } else { - result.function_ = functionBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.FunctionDefLibrary) { - return mergeFrom((org.tensorflow.framework.FunctionDefLibrary)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.FunctionDefLibrary other) { - if (other == org.tensorflow.framework.FunctionDefLibrary.getDefaultInstance()) return this; - if (functionBuilder_ == null) { - if (!other.function_.isEmpty()) { - if (function_.isEmpty()) { - function_ = other.function_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFunctionIsMutable(); - function_.addAll(other.function_); - } - onChanged(); - } - } else { - if (!other.function_.isEmpty()) { - if (functionBuilder_.isEmpty()) { - functionBuilder_.dispose(); - functionBuilder_ = null; - function_ = other.function_; - bitField0_ = (bitField0_ & ~0x00000001); - functionBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getFunctionFieldBuilder() : null; - } else { - functionBuilder_.addAllMessages(other.function_); - } - } - } - 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.FunctionDefLibrary parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.FunctionDefLibrary) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List function_ = - java.util.Collections.emptyList(); - private void ensureFunctionIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - function_ = new java.util.ArrayList(function_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.FunctionDef, org.tensorflow.framework.FunctionDef.Builder, org.tensorflow.framework.FunctionDefOrBuilder> functionBuilder_; - - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public java.util.List getFunctionList() { - if (functionBuilder_ == null) { - return java.util.Collections.unmodifiableList(function_); - } else { - return functionBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public int getFunctionCount() { - if (functionBuilder_ == null) { - return function_.size(); - } else { - return functionBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public org.tensorflow.framework.FunctionDef getFunction(int index) { - if (functionBuilder_ == null) { - return function_.get(index); - } else { - return functionBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public Builder setFunction( - int index, org.tensorflow.framework.FunctionDef value) { - if (functionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFunctionIsMutable(); - function_.set(index, value); - onChanged(); - } else { - functionBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public Builder setFunction( - int index, org.tensorflow.framework.FunctionDef.Builder builderForValue) { - if (functionBuilder_ == null) { - ensureFunctionIsMutable(); - function_.set(index, builderForValue.build()); - onChanged(); - } else { - functionBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public Builder addFunction(org.tensorflow.framework.FunctionDef value) { - if (functionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFunctionIsMutable(); - function_.add(value); - onChanged(); - } else { - functionBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public Builder addFunction( - int index, org.tensorflow.framework.FunctionDef value) { - if (functionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFunctionIsMutable(); - function_.add(index, value); - onChanged(); - } else { - functionBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public Builder addFunction( - org.tensorflow.framework.FunctionDef.Builder builderForValue) { - if (functionBuilder_ == null) { - ensureFunctionIsMutable(); - function_.add(builderForValue.build()); - onChanged(); - } else { - functionBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public Builder addFunction( - int index, org.tensorflow.framework.FunctionDef.Builder builderForValue) { - if (functionBuilder_ == null) { - ensureFunctionIsMutable(); - function_.add(index, builderForValue.build()); - onChanged(); - } else { - functionBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public Builder addAllFunction( - java.lang.Iterable values) { - if (functionBuilder_ == null) { - ensureFunctionIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, function_); - onChanged(); - } else { - functionBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public Builder clearFunction() { - if (functionBuilder_ == null) { - function_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - functionBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public Builder removeFunction(int index) { - if (functionBuilder_ == null) { - ensureFunctionIsMutable(); - function_.remove(index); - onChanged(); - } else { - functionBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public org.tensorflow.framework.FunctionDef.Builder getFunctionBuilder( - int index) { - return getFunctionFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public org.tensorflow.framework.FunctionDefOrBuilder getFunctionOrBuilder( - int index) { - if (functionBuilder_ == null) { - return function_.get(index); } else { - return functionBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public java.util.List - getFunctionOrBuilderList() { - if (functionBuilder_ != null) { - return functionBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(function_); - } - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public org.tensorflow.framework.FunctionDef.Builder addFunctionBuilder() { - return getFunctionFieldBuilder().addBuilder( - org.tensorflow.framework.FunctionDef.getDefaultInstance()); - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public org.tensorflow.framework.FunctionDef.Builder addFunctionBuilder( - int index) { - return getFunctionFieldBuilder().addBuilder( - index, org.tensorflow.framework.FunctionDef.getDefaultInstance()); - } - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - public java.util.List - getFunctionBuilderList() { - return getFunctionFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.FunctionDef, org.tensorflow.framework.FunctionDef.Builder, org.tensorflow.framework.FunctionDefOrBuilder> - getFunctionFieldBuilder() { - if (functionBuilder_ == null) { - functionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.FunctionDef, org.tensorflow.framework.FunctionDef.Builder, org.tensorflow.framework.FunctionDefOrBuilder>( - function_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - function_ = null; - } - return functionBuilder_; - } - 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.FunctionDefLibrary) - } - - // @@protoc_insertion_point(class_scope:tensorflow.FunctionDefLibrary) - private static final org.tensorflow.framework.FunctionDefLibrary DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.FunctionDefLibrary(); - } - - public static org.tensorflow.framework.FunctionDefLibrary getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public FunctionDefLibrary parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new FunctionDefLibrary(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.FunctionDefLibrary getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/FunctionDefLibraryOrBuilder.java b/src/main/java/org/tensorflow/framework/FunctionDefLibraryOrBuilder.java deleted file mode 100644 index 31ec629..0000000 --- a/src/main/java/org/tensorflow/framework/FunctionDefLibraryOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/function.proto - -package org.tensorflow.framework; - -public interface FunctionDefLibraryOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.FunctionDefLibrary) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - java.util.List - getFunctionList(); - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - org.tensorflow.framework.FunctionDef getFunction(int index); - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - int getFunctionCount(); - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - java.util.List - getFunctionOrBuilderList(); - /** - * repeated .tensorflow.FunctionDef function = 1; - */ - org.tensorflow.framework.FunctionDefOrBuilder getFunctionOrBuilder( - int index); -} diff --git a/src/main/java/org/tensorflow/framework/FunctionDefOrBuilder.java b/src/main/java/org/tensorflow/framework/FunctionDefOrBuilder.java deleted file mode 100644 index 42065b9..0000000 --- a/src/main/java/org/tensorflow/framework/FunctionDefOrBuilder.java +++ /dev/null @@ -1,81 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/function.proto - -package org.tensorflow.framework; - -public interface FunctionDefOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.FunctionDef) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .tensorflow.OpDef signature = 1; - * - *
-   * The definition of the function's name, arguments, return values,
-   * attrs etc.
-   * 
- */ - boolean hasSignature(); - /** - * optional .tensorflow.OpDef signature = 1; - * - *
-   * The definition of the function's name, arguments, return values,
-   * attrs etc.
-   * 
- */ - org.tensorflow.framework.OpDef getSignature(); - /** - * optional .tensorflow.OpDef signature = 1; - * - *
-   * The definition of the function's name, arguments, return values,
-   * attrs etc.
-   * 
- */ - org.tensorflow.framework.OpDefOrBuilder getSignatureOrBuilder(); - - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-   * The body of the function.
-   * 
- */ - java.util.List - getNodeList(); - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-   * The body of the function.
-   * 
- */ - org.tensorflow.framework.FunctionDef.Node getNode(int index); - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-   * The body of the function.
-   * 
- */ - int getNodeCount(); - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-   * The body of the function.
-   * 
- */ - java.util.List - getNodeOrBuilderList(); - /** - * repeated .tensorflow.FunctionDef.Node node = 2; - * - *
-   * The body of the function.
-   * 
- */ - org.tensorflow.framework.FunctionDef.NodeOrBuilder getNodeOrBuilder( - int index); -} diff --git a/src/main/java/org/tensorflow/framework/FunctionProtos.java b/src/main/java/org/tensorflow/framework/FunctionProtos.java deleted file mode 100644 index 96ea711..0000000 --- a/src/main/java/org/tensorflow/framework/FunctionProtos.java +++ /dev/null @@ -1,98 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/function.proto - -package org.tensorflow.framework; - -public final class FunctionProtos { - private FunctionProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_FunctionDefLibrary_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_FunctionDefLibrary_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_FunctionDef_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_FunctionDef_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_FunctionDef_Node_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_FunctionDef_Node_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_FunctionDef_Node_AttrEntry_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_FunctionDef_Node_AttrEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n(tensorflow/core/framework/function.pro" + - "to\022\ntensorflow\032*tensorflow/core/framewor" + - "k/attr_value.proto\032&tensorflow/core/fram" + - "ework/op_def.proto\"?\n\022FunctionDefLibrary" + - "\022)\n\010function\030\001 \003(\0132\027.tensorflow.Function" + - "Def\"\225\002\n\013FunctionDef\022$\n\tsignature\030\001 \001(\0132\021" + - ".tensorflow.OpDef\022*\n\004node\030\002 \003(\0132\034.tensor" + - "flow.FunctionDef.Node\032\263\001\n\004Node\022\013\n\003ret\030\001 " + - "\003(\t\022\n\n\002op\030\002 \001(\t\022\013\n\003arg\030\003 \003(\t\022\013\n\003dep\030\004 \003(" + - "\t\0224\n\004attr\030\005 \003(\0132&.tensorflow.FunctionDef", - ".Node.AttrEntry\032B\n\tAttrEntry\022\013\n\003key\030\001 \001(" + - "\t\022$\n\005value\030\002 \001(\0132\025.tensorflow.AttrValue:" + - "\0028\001B,\n\030org.tensorflow.frameworkB\016Functio" + - "nProtosP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - org.tensorflow.framework.AttrValueProtos.getDescriptor(), - org.tensorflow.framework.OpDefProtos.getDescriptor(), - }, assigner); - internal_static_tensorflow_FunctionDefLibrary_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_tensorflow_FunctionDefLibrary_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_FunctionDefLibrary_descriptor, - new java.lang.String[] { "Function", }); - internal_static_tensorflow_FunctionDef_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_tensorflow_FunctionDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_FunctionDef_descriptor, - new java.lang.String[] { "Signature", "Node", }); - internal_static_tensorflow_FunctionDef_Node_descriptor = - internal_static_tensorflow_FunctionDef_descriptor.getNestedTypes().get(0); - internal_static_tensorflow_FunctionDef_Node_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_FunctionDef_Node_descriptor, - new java.lang.String[] { "Ret", "Op", "Arg", "Dep", "Attr", }); - internal_static_tensorflow_FunctionDef_Node_AttrEntry_descriptor = - internal_static_tensorflow_FunctionDef_Node_descriptor.getNestedTypes().get(0); - internal_static_tensorflow_FunctionDef_Node_AttrEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_FunctionDef_Node_AttrEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - org.tensorflow.framework.AttrValueProtos.getDescriptor(); - org.tensorflow.framework.OpDefProtos.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/org/tensorflow/framework/GPUOptions.java b/src/main/java/org/tensorflow/framework/GPUOptions.java deleted file mode 100644 index 7d06f03..0000000 --- a/src/main/java/org/tensorflow/framework/GPUOptions.java +++ /dev/null @@ -1,663 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/config.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.GPUOptions} - */ -public final class GPUOptions extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.GPUOptions) - GPUOptionsOrBuilder { - // Use GPUOptions.newBuilder() to construct. - private GPUOptions(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private GPUOptions() { - perProcessGpuMemoryFraction_ = 0D; - allocatorType_ = ""; - deferredDeletionBytes_ = 0L; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private GPUOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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 9: { - - perProcessGpuMemoryFraction_ = input.readDouble(); - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - allocatorType_ = s; - break; - } - case 24: { - - deferredDeletionBytes_ = input.readInt64(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.GPUOptions.class, org.tensorflow.framework.GPUOptions.Builder.class); - } - - public static final int PER_PROCESS_GPU_MEMORY_FRACTION_FIELD_NUMBER = 1; - private double perProcessGpuMemoryFraction_; - /** - * optional double per_process_gpu_memory_fraction = 1; - * - *
-   * A value between 0 and 1 that indicates what fraction of the
-   * available GPU memory to pre-allocate for each process.  1 means
-   * to pre-allocate all of the GPU memory, 0.5 means the process
-   * allocates ~50% of the available GPU memory.
-   * 
- */ - public double getPerProcessGpuMemoryFraction() { - return perProcessGpuMemoryFraction_; - } - - public static final int ALLOCATOR_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object allocatorType_; - /** - * optional string allocator_type = 2; - * - *
-   * The type of GPU allocation strategy to use.
-   * Allowed values:
-   * "": The empty string (default) uses a system-chosen default
-   *     which may change over time.
-   * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
-   *        version of dlmalloc.
-   * 
- */ - public java.lang.String getAllocatorType() { - java.lang.Object ref = allocatorType_; - 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(); - allocatorType_ = s; - return s; - } - } - /** - * optional string allocator_type = 2; - * - *
-   * The type of GPU allocation strategy to use.
-   * Allowed values:
-   * "": The empty string (default) uses a system-chosen default
-   *     which may change over time.
-   * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
-   *        version of dlmalloc.
-   * 
- */ - public com.google.protobuf.ByteString - getAllocatorTypeBytes() { - java.lang.Object ref = allocatorType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - allocatorType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEFERRED_DELETION_BYTES_FIELD_NUMBER = 3; - private long deferredDeletionBytes_; - /** - * optional int64 deferred_deletion_bytes = 3; - * - *
-   * Delay deletion of up to this many bytes to reduce the number of
-   * interactions with gpu driver code.  If 0, the system chooses
-   * a reasonable default (several MBs).
-   * 
- */ - public long getDeferredDeletionBytes() { - return deferredDeletionBytes_; - } - - 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 (perProcessGpuMemoryFraction_ != 0D) { - output.writeDouble(1, perProcessGpuMemoryFraction_); - } - if (!getAllocatorTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, allocatorType_); - } - if (deferredDeletionBytes_ != 0L) { - output.writeInt64(3, deferredDeletionBytes_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (perProcessGpuMemoryFraction_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, perProcessGpuMemoryFraction_); - } - if (!getAllocatorTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, allocatorType_); - } - if (deferredDeletionBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, deferredDeletionBytes_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.GPUOptions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.GPUOptions 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.GPUOptions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.GPUOptions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.GPUOptions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.GPUOptions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.GPUOptions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.GPUOptions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.GPUOptions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.GPUOptions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.GPUOptions 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.GPUOptions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.GPUOptions) - org.tensorflow.framework.GPUOptionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.GPUOptions.class, org.tensorflow.framework.GPUOptions.Builder.class); - } - - // Construct using org.tensorflow.framework.GPUOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - perProcessGpuMemoryFraction_ = 0D; - - allocatorType_ = ""; - - deferredDeletionBytes_ = 0L; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_GPUOptions_descriptor; - } - - public org.tensorflow.framework.GPUOptions getDefaultInstanceForType() { - return org.tensorflow.framework.GPUOptions.getDefaultInstance(); - } - - public org.tensorflow.framework.GPUOptions build() { - org.tensorflow.framework.GPUOptions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.GPUOptions buildPartial() { - org.tensorflow.framework.GPUOptions result = new org.tensorflow.framework.GPUOptions(this); - result.perProcessGpuMemoryFraction_ = perProcessGpuMemoryFraction_; - result.allocatorType_ = allocatorType_; - result.deferredDeletionBytes_ = deferredDeletionBytes_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.GPUOptions) { - return mergeFrom((org.tensorflow.framework.GPUOptions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.GPUOptions other) { - if (other == org.tensorflow.framework.GPUOptions.getDefaultInstance()) return this; - if (other.getPerProcessGpuMemoryFraction() != 0D) { - setPerProcessGpuMemoryFraction(other.getPerProcessGpuMemoryFraction()); - } - if (!other.getAllocatorType().isEmpty()) { - allocatorType_ = other.allocatorType_; - onChanged(); - } - if (other.getDeferredDeletionBytes() != 0L) { - setDeferredDeletionBytes(other.getDeferredDeletionBytes()); - } - 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.GPUOptions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.GPUOptions) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private double perProcessGpuMemoryFraction_ ; - /** - * optional double per_process_gpu_memory_fraction = 1; - * - *
-     * A value between 0 and 1 that indicates what fraction of the
-     * available GPU memory to pre-allocate for each process.  1 means
-     * to pre-allocate all of the GPU memory, 0.5 means the process
-     * allocates ~50% of the available GPU memory.
-     * 
- */ - public double getPerProcessGpuMemoryFraction() { - return perProcessGpuMemoryFraction_; - } - /** - * optional double per_process_gpu_memory_fraction = 1; - * - *
-     * A value between 0 and 1 that indicates what fraction of the
-     * available GPU memory to pre-allocate for each process.  1 means
-     * to pre-allocate all of the GPU memory, 0.5 means the process
-     * allocates ~50% of the available GPU memory.
-     * 
- */ - public Builder setPerProcessGpuMemoryFraction(double value) { - - perProcessGpuMemoryFraction_ = value; - onChanged(); - return this; - } - /** - * optional double per_process_gpu_memory_fraction = 1; - * - *
-     * A value between 0 and 1 that indicates what fraction of the
-     * available GPU memory to pre-allocate for each process.  1 means
-     * to pre-allocate all of the GPU memory, 0.5 means the process
-     * allocates ~50% of the available GPU memory.
-     * 
- */ - public Builder clearPerProcessGpuMemoryFraction() { - - perProcessGpuMemoryFraction_ = 0D; - onChanged(); - return this; - } - - private java.lang.Object allocatorType_ = ""; - /** - * optional string allocator_type = 2; - * - *
-     * The type of GPU allocation strategy to use.
-     * Allowed values:
-     * "": The empty string (default) uses a system-chosen default
-     *     which may change over time.
-     * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
-     *        version of dlmalloc.
-     * 
- */ - public java.lang.String getAllocatorType() { - java.lang.Object ref = allocatorType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - allocatorType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string allocator_type = 2; - * - *
-     * The type of GPU allocation strategy to use.
-     * Allowed values:
-     * "": The empty string (default) uses a system-chosen default
-     *     which may change over time.
-     * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
-     *        version of dlmalloc.
-     * 
- */ - public com.google.protobuf.ByteString - getAllocatorTypeBytes() { - java.lang.Object ref = allocatorType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - allocatorType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string allocator_type = 2; - * - *
-     * The type of GPU allocation strategy to use.
-     * Allowed values:
-     * "": The empty string (default) uses a system-chosen default
-     *     which may change over time.
-     * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
-     *        version of dlmalloc.
-     * 
- */ - public Builder setAllocatorType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - allocatorType_ = value; - onChanged(); - return this; - } - /** - * optional string allocator_type = 2; - * - *
-     * The type of GPU allocation strategy to use.
-     * Allowed values:
-     * "": The empty string (default) uses a system-chosen default
-     *     which may change over time.
-     * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
-     *        version of dlmalloc.
-     * 
- */ - public Builder clearAllocatorType() { - - allocatorType_ = getDefaultInstance().getAllocatorType(); - onChanged(); - return this; - } - /** - * optional string allocator_type = 2; - * - *
-     * The type of GPU allocation strategy to use.
-     * Allowed values:
-     * "": The empty string (default) uses a system-chosen default
-     *     which may change over time.
-     * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
-     *        version of dlmalloc.
-     * 
- */ - public Builder setAllocatorTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - allocatorType_ = value; - onChanged(); - return this; - } - - private long deferredDeletionBytes_ ; - /** - * optional int64 deferred_deletion_bytes = 3; - * - *
-     * Delay deletion of up to this many bytes to reduce the number of
-     * interactions with gpu driver code.  If 0, the system chooses
-     * a reasonable default (several MBs).
-     * 
- */ - public long getDeferredDeletionBytes() { - return deferredDeletionBytes_; - } - /** - * optional int64 deferred_deletion_bytes = 3; - * - *
-     * Delay deletion of up to this many bytes to reduce the number of
-     * interactions with gpu driver code.  If 0, the system chooses
-     * a reasonable default (several MBs).
-     * 
- */ - public Builder setDeferredDeletionBytes(long value) { - - deferredDeletionBytes_ = value; - onChanged(); - return this; - } - /** - * optional int64 deferred_deletion_bytes = 3; - * - *
-     * Delay deletion of up to this many bytes to reduce the number of
-     * interactions with gpu driver code.  If 0, the system chooses
-     * a reasonable default (several MBs).
-     * 
- */ - public Builder clearDeferredDeletionBytes() { - - deferredDeletionBytes_ = 0L; - 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.GPUOptions) - } - - // @@protoc_insertion_point(class_scope:tensorflow.GPUOptions) - private static final org.tensorflow.framework.GPUOptions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.GPUOptions(); - } - - public static org.tensorflow.framework.GPUOptions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public GPUOptions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new GPUOptions(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.GPUOptions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/GPUOptionsOrBuilder.java b/src/main/java/org/tensorflow/framework/GPUOptionsOrBuilder.java deleted file mode 100644 index 4367ca3..0000000 --- a/src/main/java/org/tensorflow/framework/GPUOptionsOrBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/config.proto - -package org.tensorflow.framework; - -public interface GPUOptionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.GPUOptions) - com.google.protobuf.MessageOrBuilder { - - /** - * optional double per_process_gpu_memory_fraction = 1; - * - *
-   * A value between 0 and 1 that indicates what fraction of the
-   * available GPU memory to pre-allocate for each process.  1 means
-   * to pre-allocate all of the GPU memory, 0.5 means the process
-   * allocates ~50% of the available GPU memory.
-   * 
- */ - double getPerProcessGpuMemoryFraction(); - - /** - * optional string allocator_type = 2; - * - *
-   * The type of GPU allocation strategy to use.
-   * Allowed values:
-   * "": The empty string (default) uses a system-chosen default
-   *     which may change over time.
-   * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
-   *        version of dlmalloc.
-   * 
- */ - java.lang.String getAllocatorType(); - /** - * optional string allocator_type = 2; - * - *
-   * The type of GPU allocation strategy to use.
-   * Allowed values:
-   * "": The empty string (default) uses a system-chosen default
-   *     which may change over time.
-   * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
-   *        version of dlmalloc.
-   * 
- */ - com.google.protobuf.ByteString - getAllocatorTypeBytes(); - - /** - * optional int64 deferred_deletion_bytes = 3; - * - *
-   * Delay deletion of up to this many bytes to reduce the number of
-   * interactions with gpu driver code.  If 0, the system chooses
-   * a reasonable default (several MBs).
-   * 
- */ - long getDeferredDeletionBytes(); -} diff --git a/src/main/java/org/tensorflow/framework/GraphDef.java b/src/main/java/org/tensorflow/framework/GraphDef.java deleted file mode 100644 index afea0dc..0000000 --- a/src/main/java/org/tensorflow/framework/GraphDef.java +++ /dev/null @@ -1,1460 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/graph.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.GraphDef} - * - *
- * Represents the graph of operations
- * 
- */ -public final class GraphDef extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.GraphDef) - GraphDefOrBuilder { - // Use GraphDef.newBuilder() to construct. - private GraphDef(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private GraphDef() { - node_ = java.util.Collections.emptyList(); - version_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private GraphDef( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - node_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - node_.add(input.readMessage(org.tensorflow.framework.NodeDef.parser(), extensionRegistry)); - break; - } - case 18: { - org.tensorflow.framework.FunctionDefLibrary.Builder subBuilder = null; - if (library_ != null) { - subBuilder = library_.toBuilder(); - } - library_ = input.readMessage(org.tensorflow.framework.FunctionDefLibrary.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(library_); - library_ = subBuilder.buildPartial(); - } - - break; - } - case 24: { - - version_ = input.readInt32(); - break; - } - case 34: { - org.tensorflow.framework.VersionDef.Builder subBuilder = null; - if (versions_ != null) { - subBuilder = versions_.toBuilder(); - } - versions_ = input.readMessage(org.tensorflow.framework.VersionDef.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(versions_); - versions_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - node_ = java.util.Collections.unmodifiableList(node_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.GraphProtos.internal_static_tensorflow_GraphDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.GraphProtos.internal_static_tensorflow_GraphDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.GraphDef.class, org.tensorflow.framework.GraphDef.Builder.class); - } - - private int bitField0_; - public static final int NODE_FIELD_NUMBER = 1; - private java.util.List node_; - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public java.util.List getNodeList() { - return node_; - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public java.util.List - getNodeOrBuilderList() { - return node_; - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public int getNodeCount() { - return node_.size(); - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public org.tensorflow.framework.NodeDef getNode(int index) { - return node_.get(index); - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public org.tensorflow.framework.NodeDefOrBuilder getNodeOrBuilder( - int index) { - return node_.get(index); - } - - public static final int VERSIONS_FIELD_NUMBER = 4; - private org.tensorflow.framework.VersionDef versions_; - /** - * optional .tensorflow.VersionDef versions = 4; - * - *
-   * Compatibility versions of the graph.  See core/public/version.h for version
-   * history.  The GraphDef version is distinct from the TensorFlow version, and
-   * each release of TensorFlow will support a range of GraphDef versions.
-   * 
- */ - public boolean hasVersions() { - return versions_ != null; - } - /** - * optional .tensorflow.VersionDef versions = 4; - * - *
-   * Compatibility versions of the graph.  See core/public/version.h for version
-   * history.  The GraphDef version is distinct from the TensorFlow version, and
-   * each release of TensorFlow will support a range of GraphDef versions.
-   * 
- */ - public org.tensorflow.framework.VersionDef getVersions() { - return versions_ == null ? org.tensorflow.framework.VersionDef.getDefaultInstance() : versions_; - } - /** - * optional .tensorflow.VersionDef versions = 4; - * - *
-   * Compatibility versions of the graph.  See core/public/version.h for version
-   * history.  The GraphDef version is distinct from the TensorFlow version, and
-   * each release of TensorFlow will support a range of GraphDef versions.
-   * 
- */ - public org.tensorflow.framework.VersionDefOrBuilder getVersionsOrBuilder() { - return getVersions(); - } - - public static final int VERSION_FIELD_NUMBER = 3; - private int version_; - /** - * optional int32 version = 3 [deprecated = true]; - * - *
-   * Deprecated single version field; use versions above instead.  Since all
-   * GraphDef changes before "versions" was introduced were forward
-   * compatible, this field is entirely ignored.
-   * 
- */ - @java.lang.Deprecated public int getVersion() { - return version_; - } - - public static final int LIBRARY_FIELD_NUMBER = 2; - private org.tensorflow.framework.FunctionDefLibrary library_; - /** - * optional .tensorflow.FunctionDefLibrary library = 2; - * - *
-   * EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
-   * "library" provides user-defined functions.
-   * Naming:
-   *   * library.function.name are in a flat namespace.
-   *     NOTE: We may need to change it to be hierarchical to support
-   *     different orgs. E.g.,
-   *     { "/google/nn", { ... }},
-   *     { "/google/vision", { ... }}
-   *     { "/org_foo/module_bar", {...}}
-   *     map<string, FunctionDefLib> named_lib;
-   *   * If node[i].op is the name of one function in "library",
-   *     node[i] is deemed as a function call. Otherwise, node[i].op
-   *     must be a primitive operation supported by the runtime.
-   * Function call semantics:
-   *   * The callee may start execution as soon as some of its inputs
-   *     are ready. The caller may want to use Tuple() mechanism to
-   *     ensure all inputs are ready in the same time.
-   *   * The consumer of return values may start executing as soon as
-   *     the return values the consumer depends on are ready.  The
-   *     consumer may want to use Tuple() mechanism to ensure the
-   *     consumer does not start until all return values of the callee
-   *     function are ready.
-   * 
- */ - public boolean hasLibrary() { - return library_ != null; - } - /** - * optional .tensorflow.FunctionDefLibrary library = 2; - * - *
-   * EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
-   * "library" provides user-defined functions.
-   * Naming:
-   *   * library.function.name are in a flat namespace.
-   *     NOTE: We may need to change it to be hierarchical to support
-   *     different orgs. E.g.,
-   *     { "/google/nn", { ... }},
-   *     { "/google/vision", { ... }}
-   *     { "/org_foo/module_bar", {...}}
-   *     map<string, FunctionDefLib> named_lib;
-   *   * If node[i].op is the name of one function in "library",
-   *     node[i] is deemed as a function call. Otherwise, node[i].op
-   *     must be a primitive operation supported by the runtime.
-   * Function call semantics:
-   *   * The callee may start execution as soon as some of its inputs
-   *     are ready. The caller may want to use Tuple() mechanism to
-   *     ensure all inputs are ready in the same time.
-   *   * The consumer of return values may start executing as soon as
-   *     the return values the consumer depends on are ready.  The
-   *     consumer may want to use Tuple() mechanism to ensure the
-   *     consumer does not start until all return values of the callee
-   *     function are ready.
-   * 
- */ - public org.tensorflow.framework.FunctionDefLibrary getLibrary() { - return library_ == null ? org.tensorflow.framework.FunctionDefLibrary.getDefaultInstance() : library_; - } - /** - * optional .tensorflow.FunctionDefLibrary library = 2; - * - *
-   * EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
-   * "library" provides user-defined functions.
-   * Naming:
-   *   * library.function.name are in a flat namespace.
-   *     NOTE: We may need to change it to be hierarchical to support
-   *     different orgs. E.g.,
-   *     { "/google/nn", { ... }},
-   *     { "/google/vision", { ... }}
-   *     { "/org_foo/module_bar", {...}}
-   *     map<string, FunctionDefLib> named_lib;
-   *   * If node[i].op is the name of one function in "library",
-   *     node[i] is deemed as a function call. Otherwise, node[i].op
-   *     must be a primitive operation supported by the runtime.
-   * Function call semantics:
-   *   * The callee may start execution as soon as some of its inputs
-   *     are ready. The caller may want to use Tuple() mechanism to
-   *     ensure all inputs are ready in the same time.
-   *   * The consumer of return values may start executing as soon as
-   *     the return values the consumer depends on are ready.  The
-   *     consumer may want to use Tuple() mechanism to ensure the
-   *     consumer does not start until all return values of the callee
-   *     function are ready.
-   * 
- */ - public org.tensorflow.framework.FunctionDefLibraryOrBuilder getLibraryOrBuilder() { - return getLibrary(); - } - - 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 { - for (int i = 0; i < node_.size(); i++) { - output.writeMessage(1, node_.get(i)); - } - if (library_ != null) { - output.writeMessage(2, getLibrary()); - } - if (version_ != 0) { - output.writeInt32(3, version_); - } - if (versions_ != null) { - output.writeMessage(4, getVersions()); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < node_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, node_.get(i)); - } - if (library_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getLibrary()); - } - if (version_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, version_); - } - if (versions_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getVersions()); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.GraphDef parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.GraphDef 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.GraphDef parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.GraphDef parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.GraphDef parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.GraphDef parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.GraphDef parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.GraphDef parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.GraphDef parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.GraphDef parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.GraphDef 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.GraphDef} - * - *
-   * Represents the graph of operations
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.GraphDef) - org.tensorflow.framework.GraphDefOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.GraphProtos.internal_static_tensorflow_GraphDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.GraphProtos.internal_static_tensorflow_GraphDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.GraphDef.class, org.tensorflow.framework.GraphDef.Builder.class); - } - - // Construct using org.tensorflow.framework.GraphDef.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getNodeFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (nodeBuilder_ == null) { - node_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - nodeBuilder_.clear(); - } - if (versionsBuilder_ == null) { - versions_ = null; - } else { - versions_ = null; - versionsBuilder_ = null; - } - version_ = 0; - - if (libraryBuilder_ == null) { - library_ = null; - } else { - library_ = null; - libraryBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.GraphProtos.internal_static_tensorflow_GraphDef_descriptor; - } - - public org.tensorflow.framework.GraphDef getDefaultInstanceForType() { - return org.tensorflow.framework.GraphDef.getDefaultInstance(); - } - - public org.tensorflow.framework.GraphDef build() { - org.tensorflow.framework.GraphDef result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.GraphDef buildPartial() { - org.tensorflow.framework.GraphDef result = new org.tensorflow.framework.GraphDef(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (nodeBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - node_ = java.util.Collections.unmodifiableList(node_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.node_ = node_; - } else { - result.node_ = nodeBuilder_.build(); - } - if (versionsBuilder_ == null) { - result.versions_ = versions_; - } else { - result.versions_ = versionsBuilder_.build(); - } - result.version_ = version_; - if (libraryBuilder_ == null) { - result.library_ = library_; - } else { - result.library_ = libraryBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.GraphDef) { - return mergeFrom((org.tensorflow.framework.GraphDef)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.GraphDef other) { - if (other == org.tensorflow.framework.GraphDef.getDefaultInstance()) return this; - if (nodeBuilder_ == null) { - if (!other.node_.isEmpty()) { - if (node_.isEmpty()) { - node_ = other.node_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNodeIsMutable(); - node_.addAll(other.node_); - } - onChanged(); - } - } else { - if (!other.node_.isEmpty()) { - if (nodeBuilder_.isEmpty()) { - nodeBuilder_.dispose(); - nodeBuilder_ = null; - node_ = other.node_; - bitField0_ = (bitField0_ & ~0x00000001); - nodeBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getNodeFieldBuilder() : null; - } else { - nodeBuilder_.addAllMessages(other.node_); - } - } - } - if (other.hasVersions()) { - mergeVersions(other.getVersions()); - } - if (other.getVersion() != 0) { - setVersion(other.getVersion()); - } - if (other.hasLibrary()) { - mergeLibrary(other.getLibrary()); - } - 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.GraphDef parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.GraphDef) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List node_ = - java.util.Collections.emptyList(); - private void ensureNodeIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - node_ = new java.util.ArrayList(node_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.NodeDef, org.tensorflow.framework.NodeDef.Builder, org.tensorflow.framework.NodeDefOrBuilder> nodeBuilder_; - - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public java.util.List getNodeList() { - if (nodeBuilder_ == null) { - return java.util.Collections.unmodifiableList(node_); - } else { - return nodeBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public int getNodeCount() { - if (nodeBuilder_ == null) { - return node_.size(); - } else { - return nodeBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public org.tensorflow.framework.NodeDef getNode(int index) { - if (nodeBuilder_ == null) { - return node_.get(index); - } else { - return nodeBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public Builder setNode( - int index, org.tensorflow.framework.NodeDef value) { - if (nodeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodeIsMutable(); - node_.set(index, value); - onChanged(); - } else { - nodeBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public Builder setNode( - int index, org.tensorflow.framework.NodeDef.Builder builderForValue) { - if (nodeBuilder_ == null) { - ensureNodeIsMutable(); - node_.set(index, builderForValue.build()); - onChanged(); - } else { - nodeBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public Builder addNode(org.tensorflow.framework.NodeDef value) { - if (nodeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodeIsMutable(); - node_.add(value); - onChanged(); - } else { - nodeBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public Builder addNode( - int index, org.tensorflow.framework.NodeDef value) { - if (nodeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodeIsMutable(); - node_.add(index, value); - onChanged(); - } else { - nodeBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public Builder addNode( - org.tensorflow.framework.NodeDef.Builder builderForValue) { - if (nodeBuilder_ == null) { - ensureNodeIsMutable(); - node_.add(builderForValue.build()); - onChanged(); - } else { - nodeBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public Builder addNode( - int index, org.tensorflow.framework.NodeDef.Builder builderForValue) { - if (nodeBuilder_ == null) { - ensureNodeIsMutable(); - node_.add(index, builderForValue.build()); - onChanged(); - } else { - nodeBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public Builder addAllNode( - java.lang.Iterable values) { - if (nodeBuilder_ == null) { - ensureNodeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, node_); - onChanged(); - } else { - nodeBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public Builder clearNode() { - if (nodeBuilder_ == null) { - node_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - nodeBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public Builder removeNode(int index) { - if (nodeBuilder_ == null) { - ensureNodeIsMutable(); - node_.remove(index); - onChanged(); - } else { - nodeBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public org.tensorflow.framework.NodeDef.Builder getNodeBuilder( - int index) { - return getNodeFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public org.tensorflow.framework.NodeDefOrBuilder getNodeOrBuilder( - int index) { - if (nodeBuilder_ == null) { - return node_.get(index); } else { - return nodeBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public java.util.List - getNodeOrBuilderList() { - if (nodeBuilder_ != null) { - return nodeBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(node_); - } - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public org.tensorflow.framework.NodeDef.Builder addNodeBuilder() { - return getNodeFieldBuilder().addBuilder( - org.tensorflow.framework.NodeDef.getDefaultInstance()); - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public org.tensorflow.framework.NodeDef.Builder addNodeBuilder( - int index) { - return getNodeFieldBuilder().addBuilder( - index, org.tensorflow.framework.NodeDef.getDefaultInstance()); - } - /** - * repeated .tensorflow.NodeDef node = 1; - */ - public java.util.List - getNodeBuilderList() { - return getNodeFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.NodeDef, org.tensorflow.framework.NodeDef.Builder, org.tensorflow.framework.NodeDefOrBuilder> - getNodeFieldBuilder() { - if (nodeBuilder_ == null) { - nodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.NodeDef, org.tensorflow.framework.NodeDef.Builder, org.tensorflow.framework.NodeDefOrBuilder>( - node_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - node_ = null; - } - return nodeBuilder_; - } - - private org.tensorflow.framework.VersionDef versions_ = null; - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.VersionDef, org.tensorflow.framework.VersionDef.Builder, org.tensorflow.framework.VersionDefOrBuilder> versionsBuilder_; - /** - * optional .tensorflow.VersionDef versions = 4; - * - *
-     * Compatibility versions of the graph.  See core/public/version.h for version
-     * history.  The GraphDef version is distinct from the TensorFlow version, and
-     * each release of TensorFlow will support a range of GraphDef versions.
-     * 
- */ - public boolean hasVersions() { - return versionsBuilder_ != null || versions_ != null; - } - /** - * optional .tensorflow.VersionDef versions = 4; - * - *
-     * Compatibility versions of the graph.  See core/public/version.h for version
-     * history.  The GraphDef version is distinct from the TensorFlow version, and
-     * each release of TensorFlow will support a range of GraphDef versions.
-     * 
- */ - public org.tensorflow.framework.VersionDef getVersions() { - if (versionsBuilder_ == null) { - return versions_ == null ? org.tensorflow.framework.VersionDef.getDefaultInstance() : versions_; - } else { - return versionsBuilder_.getMessage(); - } - } - /** - * optional .tensorflow.VersionDef versions = 4; - * - *
-     * Compatibility versions of the graph.  See core/public/version.h for version
-     * history.  The GraphDef version is distinct from the TensorFlow version, and
-     * each release of TensorFlow will support a range of GraphDef versions.
-     * 
- */ - public Builder setVersions(org.tensorflow.framework.VersionDef value) { - if (versionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - versions_ = value; - onChanged(); - } else { - versionsBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .tensorflow.VersionDef versions = 4; - * - *
-     * Compatibility versions of the graph.  See core/public/version.h for version
-     * history.  The GraphDef version is distinct from the TensorFlow version, and
-     * each release of TensorFlow will support a range of GraphDef versions.
-     * 
- */ - public Builder setVersions( - org.tensorflow.framework.VersionDef.Builder builderForValue) { - if (versionsBuilder_ == null) { - versions_ = builderForValue.build(); - onChanged(); - } else { - versionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .tensorflow.VersionDef versions = 4; - * - *
-     * Compatibility versions of the graph.  See core/public/version.h for version
-     * history.  The GraphDef version is distinct from the TensorFlow version, and
-     * each release of TensorFlow will support a range of GraphDef versions.
-     * 
- */ - public Builder mergeVersions(org.tensorflow.framework.VersionDef value) { - if (versionsBuilder_ == null) { - if (versions_ != null) { - versions_ = - org.tensorflow.framework.VersionDef.newBuilder(versions_).mergeFrom(value).buildPartial(); - } else { - versions_ = value; - } - onChanged(); - } else { - versionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .tensorflow.VersionDef versions = 4; - * - *
-     * Compatibility versions of the graph.  See core/public/version.h for version
-     * history.  The GraphDef version is distinct from the TensorFlow version, and
-     * each release of TensorFlow will support a range of GraphDef versions.
-     * 
- */ - public Builder clearVersions() { - if (versionsBuilder_ == null) { - versions_ = null; - onChanged(); - } else { - versions_ = null; - versionsBuilder_ = null; - } - - return this; - } - /** - * optional .tensorflow.VersionDef versions = 4; - * - *
-     * Compatibility versions of the graph.  See core/public/version.h for version
-     * history.  The GraphDef version is distinct from the TensorFlow version, and
-     * each release of TensorFlow will support a range of GraphDef versions.
-     * 
- */ - public org.tensorflow.framework.VersionDef.Builder getVersionsBuilder() { - - onChanged(); - return getVersionsFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.VersionDef versions = 4; - * - *
-     * Compatibility versions of the graph.  See core/public/version.h for version
-     * history.  The GraphDef version is distinct from the TensorFlow version, and
-     * each release of TensorFlow will support a range of GraphDef versions.
-     * 
- */ - public org.tensorflow.framework.VersionDefOrBuilder getVersionsOrBuilder() { - if (versionsBuilder_ != null) { - return versionsBuilder_.getMessageOrBuilder(); - } else { - return versions_ == null ? - org.tensorflow.framework.VersionDef.getDefaultInstance() : versions_; - } - } - /** - * optional .tensorflow.VersionDef versions = 4; - * - *
-     * Compatibility versions of the graph.  See core/public/version.h for version
-     * history.  The GraphDef version is distinct from the TensorFlow version, and
-     * each release of TensorFlow will support a range of GraphDef versions.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.VersionDef, org.tensorflow.framework.VersionDef.Builder, org.tensorflow.framework.VersionDefOrBuilder> - getVersionsFieldBuilder() { - if (versionsBuilder_ == null) { - versionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.VersionDef, org.tensorflow.framework.VersionDef.Builder, org.tensorflow.framework.VersionDefOrBuilder>( - getVersions(), - getParentForChildren(), - isClean()); - versions_ = null; - } - return versionsBuilder_; - } - - private int version_ ; - /** - * optional int32 version = 3 [deprecated = true]; - * - *
-     * Deprecated single version field; use versions above instead.  Since all
-     * GraphDef changes before "versions" was introduced were forward
-     * compatible, this field is entirely ignored.
-     * 
- */ - @java.lang.Deprecated public int getVersion() { - return version_; - } - /** - * optional int32 version = 3 [deprecated = true]; - * - *
-     * Deprecated single version field; use versions above instead.  Since all
-     * GraphDef changes before "versions" was introduced were forward
-     * compatible, this field is entirely ignored.
-     * 
- */ - @java.lang.Deprecated public Builder setVersion(int value) { - - version_ = value; - onChanged(); - return this; - } - /** - * optional int32 version = 3 [deprecated = true]; - * - *
-     * Deprecated single version field; use versions above instead.  Since all
-     * GraphDef changes before "versions" was introduced were forward
-     * compatible, this field is entirely ignored.
-     * 
- */ - @java.lang.Deprecated public Builder clearVersion() { - - version_ = 0; - onChanged(); - return this; - } - - private org.tensorflow.framework.FunctionDefLibrary library_ = null; - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.FunctionDefLibrary, org.tensorflow.framework.FunctionDefLibrary.Builder, org.tensorflow.framework.FunctionDefLibraryOrBuilder> libraryBuilder_; - /** - * optional .tensorflow.FunctionDefLibrary library = 2; - * - *
-     * EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
-     * "library" provides user-defined functions.
-     * Naming:
-     *   * library.function.name are in a flat namespace.
-     *     NOTE: We may need to change it to be hierarchical to support
-     *     different orgs. E.g.,
-     *     { "/google/nn", { ... }},
-     *     { "/google/vision", { ... }}
-     *     { "/org_foo/module_bar", {...}}
-     *     map<string, FunctionDefLib> named_lib;
-     *   * If node[i].op is the name of one function in "library",
-     *     node[i] is deemed as a function call. Otherwise, node[i].op
-     *     must be a primitive operation supported by the runtime.
-     * Function call semantics:
-     *   * The callee may start execution as soon as some of its inputs
-     *     are ready. The caller may want to use Tuple() mechanism to
-     *     ensure all inputs are ready in the same time.
-     *   * The consumer of return values may start executing as soon as
-     *     the return values the consumer depends on are ready.  The
-     *     consumer may want to use Tuple() mechanism to ensure the
-     *     consumer does not start until all return values of the callee
-     *     function are ready.
-     * 
- */ - public boolean hasLibrary() { - return libraryBuilder_ != null || library_ != null; - } - /** - * optional .tensorflow.FunctionDefLibrary library = 2; - * - *
-     * EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
-     * "library" provides user-defined functions.
-     * Naming:
-     *   * library.function.name are in a flat namespace.
-     *     NOTE: We may need to change it to be hierarchical to support
-     *     different orgs. E.g.,
-     *     { "/google/nn", { ... }},
-     *     { "/google/vision", { ... }}
-     *     { "/org_foo/module_bar", {...}}
-     *     map<string, FunctionDefLib> named_lib;
-     *   * If node[i].op is the name of one function in "library",
-     *     node[i] is deemed as a function call. Otherwise, node[i].op
-     *     must be a primitive operation supported by the runtime.
-     * Function call semantics:
-     *   * The callee may start execution as soon as some of its inputs
-     *     are ready. The caller may want to use Tuple() mechanism to
-     *     ensure all inputs are ready in the same time.
-     *   * The consumer of return values may start executing as soon as
-     *     the return values the consumer depends on are ready.  The
-     *     consumer may want to use Tuple() mechanism to ensure the
-     *     consumer does not start until all return values of the callee
-     *     function are ready.
-     * 
- */ - public org.tensorflow.framework.FunctionDefLibrary getLibrary() { - if (libraryBuilder_ == null) { - return library_ == null ? org.tensorflow.framework.FunctionDefLibrary.getDefaultInstance() : library_; - } else { - return libraryBuilder_.getMessage(); - } - } - /** - * optional .tensorflow.FunctionDefLibrary library = 2; - * - *
-     * EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
-     * "library" provides user-defined functions.
-     * Naming:
-     *   * library.function.name are in a flat namespace.
-     *     NOTE: We may need to change it to be hierarchical to support
-     *     different orgs. E.g.,
-     *     { "/google/nn", { ... }},
-     *     { "/google/vision", { ... }}
-     *     { "/org_foo/module_bar", {...}}
-     *     map<string, FunctionDefLib> named_lib;
-     *   * If node[i].op is the name of one function in "library",
-     *     node[i] is deemed as a function call. Otherwise, node[i].op
-     *     must be a primitive operation supported by the runtime.
-     * Function call semantics:
-     *   * The callee may start execution as soon as some of its inputs
-     *     are ready. The caller may want to use Tuple() mechanism to
-     *     ensure all inputs are ready in the same time.
-     *   * The consumer of return values may start executing as soon as
-     *     the return values the consumer depends on are ready.  The
-     *     consumer may want to use Tuple() mechanism to ensure the
-     *     consumer does not start until all return values of the callee
-     *     function are ready.
-     * 
- */ - public Builder setLibrary(org.tensorflow.framework.FunctionDefLibrary value) { - if (libraryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - library_ = value; - onChanged(); - } else { - libraryBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .tensorflow.FunctionDefLibrary library = 2; - * - *
-     * EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
-     * "library" provides user-defined functions.
-     * Naming:
-     *   * library.function.name are in a flat namespace.
-     *     NOTE: We may need to change it to be hierarchical to support
-     *     different orgs. E.g.,
-     *     { "/google/nn", { ... }},
-     *     { "/google/vision", { ... }}
-     *     { "/org_foo/module_bar", {...}}
-     *     map<string, FunctionDefLib> named_lib;
-     *   * If node[i].op is the name of one function in "library",
-     *     node[i] is deemed as a function call. Otherwise, node[i].op
-     *     must be a primitive operation supported by the runtime.
-     * Function call semantics:
-     *   * The callee may start execution as soon as some of its inputs
-     *     are ready. The caller may want to use Tuple() mechanism to
-     *     ensure all inputs are ready in the same time.
-     *   * The consumer of return values may start executing as soon as
-     *     the return values the consumer depends on are ready.  The
-     *     consumer may want to use Tuple() mechanism to ensure the
-     *     consumer does not start until all return values of the callee
-     *     function are ready.
-     * 
- */ - public Builder setLibrary( - org.tensorflow.framework.FunctionDefLibrary.Builder builderForValue) { - if (libraryBuilder_ == null) { - library_ = builderForValue.build(); - onChanged(); - } else { - libraryBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .tensorflow.FunctionDefLibrary library = 2; - * - *
-     * EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
-     * "library" provides user-defined functions.
-     * Naming:
-     *   * library.function.name are in a flat namespace.
-     *     NOTE: We may need to change it to be hierarchical to support
-     *     different orgs. E.g.,
-     *     { "/google/nn", { ... }},
-     *     { "/google/vision", { ... }}
-     *     { "/org_foo/module_bar", {...}}
-     *     map<string, FunctionDefLib> named_lib;
-     *   * If node[i].op is the name of one function in "library",
-     *     node[i] is deemed as a function call. Otherwise, node[i].op
-     *     must be a primitive operation supported by the runtime.
-     * Function call semantics:
-     *   * The callee may start execution as soon as some of its inputs
-     *     are ready. The caller may want to use Tuple() mechanism to
-     *     ensure all inputs are ready in the same time.
-     *   * The consumer of return values may start executing as soon as
-     *     the return values the consumer depends on are ready.  The
-     *     consumer may want to use Tuple() mechanism to ensure the
-     *     consumer does not start until all return values of the callee
-     *     function are ready.
-     * 
- */ - public Builder mergeLibrary(org.tensorflow.framework.FunctionDefLibrary value) { - if (libraryBuilder_ == null) { - if (library_ != null) { - library_ = - org.tensorflow.framework.FunctionDefLibrary.newBuilder(library_).mergeFrom(value).buildPartial(); - } else { - library_ = value; - } - onChanged(); - } else { - libraryBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .tensorflow.FunctionDefLibrary library = 2; - * - *
-     * EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
-     * "library" provides user-defined functions.
-     * Naming:
-     *   * library.function.name are in a flat namespace.
-     *     NOTE: We may need to change it to be hierarchical to support
-     *     different orgs. E.g.,
-     *     { "/google/nn", { ... }},
-     *     { "/google/vision", { ... }}
-     *     { "/org_foo/module_bar", {...}}
-     *     map<string, FunctionDefLib> named_lib;
-     *   * If node[i].op is the name of one function in "library",
-     *     node[i] is deemed as a function call. Otherwise, node[i].op
-     *     must be a primitive operation supported by the runtime.
-     * Function call semantics:
-     *   * The callee may start execution as soon as some of its inputs
-     *     are ready. The caller may want to use Tuple() mechanism to
-     *     ensure all inputs are ready in the same time.
-     *   * The consumer of return values may start executing as soon as
-     *     the return values the consumer depends on are ready.  The
-     *     consumer may want to use Tuple() mechanism to ensure the
-     *     consumer does not start until all return values of the callee
-     *     function are ready.
-     * 
- */ - public Builder clearLibrary() { - if (libraryBuilder_ == null) { - library_ = null; - onChanged(); - } else { - library_ = null; - libraryBuilder_ = null; - } - - return this; - } - /** - * optional .tensorflow.FunctionDefLibrary library = 2; - * - *
-     * EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
-     * "library" provides user-defined functions.
-     * Naming:
-     *   * library.function.name are in a flat namespace.
-     *     NOTE: We may need to change it to be hierarchical to support
-     *     different orgs. E.g.,
-     *     { "/google/nn", { ... }},
-     *     { "/google/vision", { ... }}
-     *     { "/org_foo/module_bar", {...}}
-     *     map<string, FunctionDefLib> named_lib;
-     *   * If node[i].op is the name of one function in "library",
-     *     node[i] is deemed as a function call. Otherwise, node[i].op
-     *     must be a primitive operation supported by the runtime.
-     * Function call semantics:
-     *   * The callee may start execution as soon as some of its inputs
-     *     are ready. The caller may want to use Tuple() mechanism to
-     *     ensure all inputs are ready in the same time.
-     *   * The consumer of return values may start executing as soon as
-     *     the return values the consumer depends on are ready.  The
-     *     consumer may want to use Tuple() mechanism to ensure the
-     *     consumer does not start until all return values of the callee
-     *     function are ready.
-     * 
- */ - public org.tensorflow.framework.FunctionDefLibrary.Builder getLibraryBuilder() { - - onChanged(); - return getLibraryFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.FunctionDefLibrary library = 2; - * - *
-     * EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
-     * "library" provides user-defined functions.
-     * Naming:
-     *   * library.function.name are in a flat namespace.
-     *     NOTE: We may need to change it to be hierarchical to support
-     *     different orgs. E.g.,
-     *     { "/google/nn", { ... }},
-     *     { "/google/vision", { ... }}
-     *     { "/org_foo/module_bar", {...}}
-     *     map<string, FunctionDefLib> named_lib;
-     *   * If node[i].op is the name of one function in "library",
-     *     node[i] is deemed as a function call. Otherwise, node[i].op
-     *     must be a primitive operation supported by the runtime.
-     * Function call semantics:
-     *   * The callee may start execution as soon as some of its inputs
-     *     are ready. The caller may want to use Tuple() mechanism to
-     *     ensure all inputs are ready in the same time.
-     *   * The consumer of return values may start executing as soon as
-     *     the return values the consumer depends on are ready.  The
-     *     consumer may want to use Tuple() mechanism to ensure the
-     *     consumer does not start until all return values of the callee
-     *     function are ready.
-     * 
- */ - public org.tensorflow.framework.FunctionDefLibraryOrBuilder getLibraryOrBuilder() { - if (libraryBuilder_ != null) { - return libraryBuilder_.getMessageOrBuilder(); - } else { - return library_ == null ? - org.tensorflow.framework.FunctionDefLibrary.getDefaultInstance() : library_; - } - } - /** - * optional .tensorflow.FunctionDefLibrary library = 2; - * - *
-     * EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
-     * "library" provides user-defined functions.
-     * Naming:
-     *   * library.function.name are in a flat namespace.
-     *     NOTE: We may need to change it to be hierarchical to support
-     *     different orgs. E.g.,
-     *     { "/google/nn", { ... }},
-     *     { "/google/vision", { ... }}
-     *     { "/org_foo/module_bar", {...}}
-     *     map<string, FunctionDefLib> named_lib;
-     *   * If node[i].op is the name of one function in "library",
-     *     node[i] is deemed as a function call. Otherwise, node[i].op
-     *     must be a primitive operation supported by the runtime.
-     * Function call semantics:
-     *   * The callee may start execution as soon as some of its inputs
-     *     are ready. The caller may want to use Tuple() mechanism to
-     *     ensure all inputs are ready in the same time.
-     *   * The consumer of return values may start executing as soon as
-     *     the return values the consumer depends on are ready.  The
-     *     consumer may want to use Tuple() mechanism to ensure the
-     *     consumer does not start until all return values of the callee
-     *     function are ready.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.FunctionDefLibrary, org.tensorflow.framework.FunctionDefLibrary.Builder, org.tensorflow.framework.FunctionDefLibraryOrBuilder> - getLibraryFieldBuilder() { - if (libraryBuilder_ == null) { - libraryBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.FunctionDefLibrary, org.tensorflow.framework.FunctionDefLibrary.Builder, org.tensorflow.framework.FunctionDefLibraryOrBuilder>( - getLibrary(), - getParentForChildren(), - isClean()); - library_ = null; - } - return libraryBuilder_; - } - 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.GraphDef) - } - - // @@protoc_insertion_point(class_scope:tensorflow.GraphDef) - private static final org.tensorflow.framework.GraphDef DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.GraphDef(); - } - - public static org.tensorflow.framework.GraphDef getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public GraphDef parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new GraphDef(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.GraphDef getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/GraphDefOrBuilder.java b/src/main/java/org/tensorflow/framework/GraphDefOrBuilder.java deleted file mode 100644 index 4c8b950..0000000 --- a/src/main/java/org/tensorflow/framework/GraphDefOrBuilder.java +++ /dev/null @@ -1,163 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/graph.proto - -package org.tensorflow.framework; - -public interface GraphDefOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.GraphDef) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .tensorflow.NodeDef node = 1; - */ - java.util.List - getNodeList(); - /** - * repeated .tensorflow.NodeDef node = 1; - */ - org.tensorflow.framework.NodeDef getNode(int index); - /** - * repeated .tensorflow.NodeDef node = 1; - */ - int getNodeCount(); - /** - * repeated .tensorflow.NodeDef node = 1; - */ - java.util.List - getNodeOrBuilderList(); - /** - * repeated .tensorflow.NodeDef node = 1; - */ - org.tensorflow.framework.NodeDefOrBuilder getNodeOrBuilder( - int index); - - /** - * optional .tensorflow.VersionDef versions = 4; - * - *
-   * Compatibility versions of the graph.  See core/public/version.h for version
-   * history.  The GraphDef version is distinct from the TensorFlow version, and
-   * each release of TensorFlow will support a range of GraphDef versions.
-   * 
- */ - boolean hasVersions(); - /** - * optional .tensorflow.VersionDef versions = 4; - * - *
-   * Compatibility versions of the graph.  See core/public/version.h for version
-   * history.  The GraphDef version is distinct from the TensorFlow version, and
-   * each release of TensorFlow will support a range of GraphDef versions.
-   * 
- */ - org.tensorflow.framework.VersionDef getVersions(); - /** - * optional .tensorflow.VersionDef versions = 4; - * - *
-   * Compatibility versions of the graph.  See core/public/version.h for version
-   * history.  The GraphDef version is distinct from the TensorFlow version, and
-   * each release of TensorFlow will support a range of GraphDef versions.
-   * 
- */ - org.tensorflow.framework.VersionDefOrBuilder getVersionsOrBuilder(); - - /** - * optional int32 version = 3 [deprecated = true]; - * - *
-   * Deprecated single version field; use versions above instead.  Since all
-   * GraphDef changes before "versions" was introduced were forward
-   * compatible, this field is entirely ignored.
-   * 
- */ - @java.lang.Deprecated int getVersion(); - - /** - * optional .tensorflow.FunctionDefLibrary library = 2; - * - *
-   * EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
-   * "library" provides user-defined functions.
-   * Naming:
-   *   * library.function.name are in a flat namespace.
-   *     NOTE: We may need to change it to be hierarchical to support
-   *     different orgs. E.g.,
-   *     { "/google/nn", { ... }},
-   *     { "/google/vision", { ... }}
-   *     { "/org_foo/module_bar", {...}}
-   *     map<string, FunctionDefLib> named_lib;
-   *   * If node[i].op is the name of one function in "library",
-   *     node[i] is deemed as a function call. Otherwise, node[i].op
-   *     must be a primitive operation supported by the runtime.
-   * Function call semantics:
-   *   * The callee may start execution as soon as some of its inputs
-   *     are ready. The caller may want to use Tuple() mechanism to
-   *     ensure all inputs are ready in the same time.
-   *   * The consumer of return values may start executing as soon as
-   *     the return values the consumer depends on are ready.  The
-   *     consumer may want to use Tuple() mechanism to ensure the
-   *     consumer does not start until all return values of the callee
-   *     function are ready.
-   * 
- */ - boolean hasLibrary(); - /** - * optional .tensorflow.FunctionDefLibrary library = 2; - * - *
-   * EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
-   * "library" provides user-defined functions.
-   * Naming:
-   *   * library.function.name are in a flat namespace.
-   *     NOTE: We may need to change it to be hierarchical to support
-   *     different orgs. E.g.,
-   *     { "/google/nn", { ... }},
-   *     { "/google/vision", { ... }}
-   *     { "/org_foo/module_bar", {...}}
-   *     map<string, FunctionDefLib> named_lib;
-   *   * If node[i].op is the name of one function in "library",
-   *     node[i] is deemed as a function call. Otherwise, node[i].op
-   *     must be a primitive operation supported by the runtime.
-   * Function call semantics:
-   *   * The callee may start execution as soon as some of its inputs
-   *     are ready. The caller may want to use Tuple() mechanism to
-   *     ensure all inputs are ready in the same time.
-   *   * The consumer of return values may start executing as soon as
-   *     the return values the consumer depends on are ready.  The
-   *     consumer may want to use Tuple() mechanism to ensure the
-   *     consumer does not start until all return values of the callee
-   *     function are ready.
-   * 
- */ - org.tensorflow.framework.FunctionDefLibrary getLibrary(); - /** - * optional .tensorflow.FunctionDefLibrary library = 2; - * - *
-   * EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
-   * "library" provides user-defined functions.
-   * Naming:
-   *   * library.function.name are in a flat namespace.
-   *     NOTE: We may need to change it to be hierarchical to support
-   *     different orgs. E.g.,
-   *     { "/google/nn", { ... }},
-   *     { "/google/vision", { ... }}
-   *     { "/org_foo/module_bar", {...}}
-   *     map<string, FunctionDefLib> named_lib;
-   *   * If node[i].op is the name of one function in "library",
-   *     node[i] is deemed as a function call. Otherwise, node[i].op
-   *     must be a primitive operation supported by the runtime.
-   * Function call semantics:
-   *   * The callee may start execution as soon as some of its inputs
-   *     are ready. The caller may want to use Tuple() mechanism to
-   *     ensure all inputs are ready in the same time.
-   *   * The consumer of return values may start executing as soon as
-   *     the return values the consumer depends on are ready.  The
-   *     consumer may want to use Tuple() mechanism to ensure the
-   *     consumer does not start until all return values of the callee
-   *     function are ready.
-   * 
- */ - org.tensorflow.framework.FunctionDefLibraryOrBuilder getLibraryOrBuilder(); -} diff --git a/src/main/java/org/tensorflow/framework/GraphOptions.java b/src/main/java/org/tensorflow/framework/GraphOptions.java deleted file mode 100644 index 56cb59e..0000000 --- a/src/main/java/org/tensorflow/framework/GraphOptions.java +++ /dev/null @@ -1,611 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/config.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.GraphOptions} - */ -public final class GraphOptions extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.GraphOptions) - GraphOptionsOrBuilder { - // Use GraphOptions.newBuilder() to construct. - private GraphOptions(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private GraphOptions() { - enableRecvScheduling_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private GraphOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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 16: { - - enableRecvScheduling_ = input.readBool(); - break; - } - case 26: { - org.tensorflow.framework.OptimizerOptions.Builder subBuilder = null; - if (optimizerOptions_ != null) { - subBuilder = optimizerOptions_.toBuilder(); - } - optimizerOptions_ = input.readMessage(org.tensorflow.framework.OptimizerOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(optimizerOptions_); - optimizerOptions_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_GraphOptions_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_GraphOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.GraphOptions.class, org.tensorflow.framework.GraphOptions.Builder.class); - } - - public static final int ENABLE_RECV_SCHEDULING_FIELD_NUMBER = 2; - private boolean enableRecvScheduling_; - /** - * optional bool enable_recv_scheduling = 2; - * - *
-   * If true, use control flow to schedule the activation of Recv nodes.
-   * (Currently ignored.)
-   * 
- */ - public boolean getEnableRecvScheduling() { - return enableRecvScheduling_; - } - - public static final int OPTIMIZER_OPTIONS_FIELD_NUMBER = 3; - private org.tensorflow.framework.OptimizerOptions optimizerOptions_; - /** - * optional .tensorflow.OptimizerOptions optimizer_options = 3; - * - *
-   * Options controlling how graph is optimized.
-   * 
- */ - public boolean hasOptimizerOptions() { - return optimizerOptions_ != null; - } - /** - * optional .tensorflow.OptimizerOptions optimizer_options = 3; - * - *
-   * Options controlling how graph is optimized.
-   * 
- */ - public org.tensorflow.framework.OptimizerOptions getOptimizerOptions() { - return optimizerOptions_ == null ? org.tensorflow.framework.OptimizerOptions.getDefaultInstance() : optimizerOptions_; - } - /** - * optional .tensorflow.OptimizerOptions optimizer_options = 3; - * - *
-   * Options controlling how graph is optimized.
-   * 
- */ - public org.tensorflow.framework.OptimizerOptionsOrBuilder getOptimizerOptionsOrBuilder() { - return getOptimizerOptions(); - } - - 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 (enableRecvScheduling_ != false) { - output.writeBool(2, enableRecvScheduling_); - } - if (optimizerOptions_ != null) { - output.writeMessage(3, getOptimizerOptions()); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enableRecvScheduling_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, enableRecvScheduling_); - } - if (optimizerOptions_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getOptimizerOptions()); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.GraphOptions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.GraphOptions 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.GraphOptions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.GraphOptions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.GraphOptions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.GraphOptions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.GraphOptions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.GraphOptions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.GraphOptions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.GraphOptions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.GraphOptions 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.GraphOptions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.GraphOptions) - org.tensorflow.framework.GraphOptionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_GraphOptions_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_GraphOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.GraphOptions.class, org.tensorflow.framework.GraphOptions.Builder.class); - } - - // Construct using org.tensorflow.framework.GraphOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - enableRecvScheduling_ = false; - - if (optimizerOptionsBuilder_ == null) { - optimizerOptions_ = null; - } else { - optimizerOptions_ = null; - optimizerOptionsBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_GraphOptions_descriptor; - } - - public org.tensorflow.framework.GraphOptions getDefaultInstanceForType() { - return org.tensorflow.framework.GraphOptions.getDefaultInstance(); - } - - public org.tensorflow.framework.GraphOptions build() { - org.tensorflow.framework.GraphOptions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.GraphOptions buildPartial() { - org.tensorflow.framework.GraphOptions result = new org.tensorflow.framework.GraphOptions(this); - result.enableRecvScheduling_ = enableRecvScheduling_; - if (optimizerOptionsBuilder_ == null) { - result.optimizerOptions_ = optimizerOptions_; - } else { - result.optimizerOptions_ = optimizerOptionsBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.GraphOptions) { - return mergeFrom((org.tensorflow.framework.GraphOptions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.GraphOptions other) { - if (other == org.tensorflow.framework.GraphOptions.getDefaultInstance()) return this; - if (other.getEnableRecvScheduling() != false) { - setEnableRecvScheduling(other.getEnableRecvScheduling()); - } - if (other.hasOptimizerOptions()) { - mergeOptimizerOptions(other.getOptimizerOptions()); - } - 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.GraphOptions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.GraphOptions) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private boolean enableRecvScheduling_ ; - /** - * optional bool enable_recv_scheduling = 2; - * - *
-     * If true, use control flow to schedule the activation of Recv nodes.
-     * (Currently ignored.)
-     * 
- */ - public boolean getEnableRecvScheduling() { - return enableRecvScheduling_; - } - /** - * optional bool enable_recv_scheduling = 2; - * - *
-     * If true, use control flow to schedule the activation of Recv nodes.
-     * (Currently ignored.)
-     * 
- */ - public Builder setEnableRecvScheduling(boolean value) { - - enableRecvScheduling_ = value; - onChanged(); - return this; - } - /** - * optional bool enable_recv_scheduling = 2; - * - *
-     * If true, use control flow to schedule the activation of Recv nodes.
-     * (Currently ignored.)
-     * 
- */ - public Builder clearEnableRecvScheduling() { - - enableRecvScheduling_ = false; - onChanged(); - return this; - } - - private org.tensorflow.framework.OptimizerOptions optimizerOptions_ = null; - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.OptimizerOptions, org.tensorflow.framework.OptimizerOptions.Builder, org.tensorflow.framework.OptimizerOptionsOrBuilder> optimizerOptionsBuilder_; - /** - * optional .tensorflow.OptimizerOptions optimizer_options = 3; - * - *
-     * Options controlling how graph is optimized.
-     * 
- */ - public boolean hasOptimizerOptions() { - return optimizerOptionsBuilder_ != null || optimizerOptions_ != null; - } - /** - * optional .tensorflow.OptimizerOptions optimizer_options = 3; - * - *
-     * Options controlling how graph is optimized.
-     * 
- */ - public org.tensorflow.framework.OptimizerOptions getOptimizerOptions() { - if (optimizerOptionsBuilder_ == null) { - return optimizerOptions_ == null ? org.tensorflow.framework.OptimizerOptions.getDefaultInstance() : optimizerOptions_; - } else { - return optimizerOptionsBuilder_.getMessage(); - } - } - /** - * optional .tensorflow.OptimizerOptions optimizer_options = 3; - * - *
-     * Options controlling how graph is optimized.
-     * 
- */ - public Builder setOptimizerOptions(org.tensorflow.framework.OptimizerOptions value) { - if (optimizerOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - optimizerOptions_ = value; - onChanged(); - } else { - optimizerOptionsBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .tensorflow.OptimizerOptions optimizer_options = 3; - * - *
-     * Options controlling how graph is optimized.
-     * 
- */ - public Builder setOptimizerOptions( - org.tensorflow.framework.OptimizerOptions.Builder builderForValue) { - if (optimizerOptionsBuilder_ == null) { - optimizerOptions_ = builderForValue.build(); - onChanged(); - } else { - optimizerOptionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .tensorflow.OptimizerOptions optimizer_options = 3; - * - *
-     * Options controlling how graph is optimized.
-     * 
- */ - public Builder mergeOptimizerOptions(org.tensorflow.framework.OptimizerOptions value) { - if (optimizerOptionsBuilder_ == null) { - if (optimizerOptions_ != null) { - optimizerOptions_ = - org.tensorflow.framework.OptimizerOptions.newBuilder(optimizerOptions_).mergeFrom(value).buildPartial(); - } else { - optimizerOptions_ = value; - } - onChanged(); - } else { - optimizerOptionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .tensorflow.OptimizerOptions optimizer_options = 3; - * - *
-     * Options controlling how graph is optimized.
-     * 
- */ - public Builder clearOptimizerOptions() { - if (optimizerOptionsBuilder_ == null) { - optimizerOptions_ = null; - onChanged(); - } else { - optimizerOptions_ = null; - optimizerOptionsBuilder_ = null; - } - - return this; - } - /** - * optional .tensorflow.OptimizerOptions optimizer_options = 3; - * - *
-     * Options controlling how graph is optimized.
-     * 
- */ - public org.tensorflow.framework.OptimizerOptions.Builder getOptimizerOptionsBuilder() { - - onChanged(); - return getOptimizerOptionsFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.OptimizerOptions optimizer_options = 3; - * - *
-     * Options controlling how graph is optimized.
-     * 
- */ - public org.tensorflow.framework.OptimizerOptionsOrBuilder getOptimizerOptionsOrBuilder() { - if (optimizerOptionsBuilder_ != null) { - return optimizerOptionsBuilder_.getMessageOrBuilder(); - } else { - return optimizerOptions_ == null ? - org.tensorflow.framework.OptimizerOptions.getDefaultInstance() : optimizerOptions_; - } - } - /** - * optional .tensorflow.OptimizerOptions optimizer_options = 3; - * - *
-     * Options controlling how graph is optimized.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.OptimizerOptions, org.tensorflow.framework.OptimizerOptions.Builder, org.tensorflow.framework.OptimizerOptionsOrBuilder> - getOptimizerOptionsFieldBuilder() { - if (optimizerOptionsBuilder_ == null) { - optimizerOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.OptimizerOptions, org.tensorflow.framework.OptimizerOptions.Builder, org.tensorflow.framework.OptimizerOptionsOrBuilder>( - getOptimizerOptions(), - getParentForChildren(), - isClean()); - optimizerOptions_ = null; - } - return optimizerOptionsBuilder_; - } - 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.GraphOptions) - } - - // @@protoc_insertion_point(class_scope:tensorflow.GraphOptions) - private static final org.tensorflow.framework.GraphOptions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.GraphOptions(); - } - - public static org.tensorflow.framework.GraphOptions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public GraphOptions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new GraphOptions(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.GraphOptions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/GraphOptionsOrBuilder.java b/src/main/java/org/tensorflow/framework/GraphOptionsOrBuilder.java deleted file mode 100644 index 59a61ba..0000000 --- a/src/main/java/org/tensorflow/framework/GraphOptionsOrBuilder.java +++ /dev/null @@ -1,44 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/config.proto - -package org.tensorflow.framework; - -public interface GraphOptionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.GraphOptions) - com.google.protobuf.MessageOrBuilder { - - /** - * optional bool enable_recv_scheduling = 2; - * - *
-   * If true, use control flow to schedule the activation of Recv nodes.
-   * (Currently ignored.)
-   * 
- */ - boolean getEnableRecvScheduling(); - - /** - * optional .tensorflow.OptimizerOptions optimizer_options = 3; - * - *
-   * Options controlling how graph is optimized.
-   * 
- */ - boolean hasOptimizerOptions(); - /** - * optional .tensorflow.OptimizerOptions optimizer_options = 3; - * - *
-   * Options controlling how graph is optimized.
-   * 
- */ - org.tensorflow.framework.OptimizerOptions getOptimizerOptions(); - /** - * optional .tensorflow.OptimizerOptions optimizer_options = 3; - * - *
-   * Options controlling how graph is optimized.
-   * 
- */ - org.tensorflow.framework.OptimizerOptionsOrBuilder getOptimizerOptionsOrBuilder(); -} diff --git a/src/main/java/org/tensorflow/framework/GraphProtos.java b/src/main/java/org/tensorflow/framework/GraphProtos.java deleted file mode 100644 index 791a18e..0000000 --- a/src/main/java/org/tensorflow/framework/GraphProtos.java +++ /dev/null @@ -1,90 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/graph.proto - -package org.tensorflow.framework; - -public final class GraphProtos { - private GraphProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_GraphDef_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_GraphDef_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_NodeDef_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_NodeDef_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_NodeDef_AttrEntry_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_NodeDef_AttrEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n%tensorflow/core/framework/graph.proto\022" + - "\ntensorflow\032*tensorflow/core/framework/a" + - "ttr_value.proto\032(tensorflow/core/framewo" + - "rk/function.proto\032(tensorflow/core/frame" + - "work/versions.proto\"\235\001\n\010GraphDef\022!\n\004node" + - "\030\001 \003(\0132\023.tensorflow.NodeDef\022(\n\010versions\030" + - "\004 \001(\0132\026.tensorflow.VersionDef\022\023\n\007version" + - "\030\003 \001(\005B\002\030\001\022/\n\007library\030\002 \001(\0132\036.tensorflow" + - ".FunctionDefLibrary\"\263\001\n\007NodeDef\022\014\n\004name\030" + - "\001 \001(\t\022\n\n\002op\030\002 \001(\t\022\r\n\005input\030\003 \003(\t\022\016\n\006devi", - "ce\030\004 \001(\t\022+\n\004attr\030\005 \003(\0132\035.tensorflow.Node" + - "Def.AttrEntry\032B\n\tAttrEntry\022\013\n\003key\030\001 \001(\t\022" + - "$\n\005value\030\002 \001(\0132\025.tensorflow.AttrValue:\0028" + - "\001B)\n\030org.tensorflow.frameworkB\013GraphProt" + - "osP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - org.tensorflow.framework.AttrValueProtos.getDescriptor(), - org.tensorflow.framework.FunctionProtos.getDescriptor(), - org.tensorflow.framework.VersionsProtos.getDescriptor(), - }, assigner); - internal_static_tensorflow_GraphDef_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_tensorflow_GraphDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_GraphDef_descriptor, - new java.lang.String[] { "Node", "Versions", "Version", "Library", }); - internal_static_tensorflow_NodeDef_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_tensorflow_NodeDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_NodeDef_descriptor, - new java.lang.String[] { "Name", "Op", "Input", "Device", "Attr", }); - internal_static_tensorflow_NodeDef_AttrEntry_descriptor = - internal_static_tensorflow_NodeDef_descriptor.getNestedTypes().get(0); - internal_static_tensorflow_NodeDef_AttrEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_NodeDef_AttrEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - org.tensorflow.framework.AttrValueProtos.getDescriptor(); - org.tensorflow.framework.FunctionProtos.getDescriptor(); - org.tensorflow.framework.VersionsProtos.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/org/tensorflow/framework/HistogramProto.java b/src/main/java/org/tensorflow/framework/HistogramProto.java deleted file mode 100644 index 37fda8e..0000000 --- a/src/main/java/org/tensorflow/framework/HistogramProto.java +++ /dev/null @@ -1,981 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/summary.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.HistogramProto} - * - *
- * Serialization format for histogram module in
- * core/lib/histogram/histogram.h
- * 
- */ -public final class HistogramProto extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.HistogramProto) - HistogramProtoOrBuilder { - // Use HistogramProto.newBuilder() to construct. - private HistogramProto(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private HistogramProto() { - min_ = 0D; - max_ = 0D; - num_ = 0D; - sum_ = 0D; - sumSquares_ = 0D; - bucketLimit_ = java.util.Collections.emptyList(); - bucket_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private HistogramProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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 9: { - - min_ = input.readDouble(); - break; - } - case 17: { - - max_ = input.readDouble(); - break; - } - case 25: { - - num_ = input.readDouble(); - break; - } - case 33: { - - sum_ = input.readDouble(); - break; - } - case 41: { - - sumSquares_ = input.readDouble(); - break; - } - case 49: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - bucketLimit_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - bucketLimit_.add(input.readDouble()); - break; - } - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) { - bucketLimit_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - while (input.getBytesUntilLimit() > 0) { - bucketLimit_.add(input.readDouble()); - } - input.popLimit(limit); - break; - } - case 57: { - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - bucket_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - bucket_.add(input.readDouble()); - break; - } - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040) && input.getBytesUntilLimit() > 0) { - bucket_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - while (input.getBytesUntilLimit() > 0) { - bucket_.add(input.readDouble()); - } - input.popLimit(limit); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - bucketLimit_ = java.util.Collections.unmodifiableList(bucketLimit_); - } - if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - bucket_ = java.util.Collections.unmodifiableList(bucket_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_HistogramProto_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_HistogramProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.HistogramProto.class, org.tensorflow.framework.HistogramProto.Builder.class); - } - - private int bitField0_; - public static final int MIN_FIELD_NUMBER = 1; - private double min_; - /** - * optional double min = 1; - */ - public double getMin() { - return min_; - } - - public static final int MAX_FIELD_NUMBER = 2; - private double max_; - /** - * optional double max = 2; - */ - public double getMax() { - return max_; - } - - public static final int NUM_FIELD_NUMBER = 3; - private double num_; - /** - * optional double num = 3; - */ - public double getNum() { - return num_; - } - - public static final int SUM_FIELD_NUMBER = 4; - private double sum_; - /** - * optional double sum = 4; - */ - public double getSum() { - return sum_; - } - - public static final int SUM_SQUARES_FIELD_NUMBER = 5; - private double sumSquares_; - /** - * optional double sum_squares = 5; - */ - public double getSumSquares() { - return sumSquares_; - } - - public static final int BUCKET_LIMIT_FIELD_NUMBER = 6; - private java.util.List bucketLimit_; - /** - * repeated double bucket_limit = 6 [packed = true]; - * - *
-   * Parallel arrays encoding the bucket boundaries and the bucket values.
-   * bucket(i) is the count for the bucket i.  The range for
-   * a bucket is:
-   *   i == 0:  -DBL_MAX .. bucket_limit(0)
-   *   i != 0:  bucket_limit(i-1) .. bucket_limit(i)
-   * 
- */ - public java.util.List - getBucketLimitList() { - return bucketLimit_; - } - /** - * repeated double bucket_limit = 6 [packed = true]; - * - *
-   * Parallel arrays encoding the bucket boundaries and the bucket values.
-   * bucket(i) is the count for the bucket i.  The range for
-   * a bucket is:
-   *   i == 0:  -DBL_MAX .. bucket_limit(0)
-   *   i != 0:  bucket_limit(i-1) .. bucket_limit(i)
-   * 
- */ - public int getBucketLimitCount() { - return bucketLimit_.size(); - } - /** - * repeated double bucket_limit = 6 [packed = true]; - * - *
-   * Parallel arrays encoding the bucket boundaries and the bucket values.
-   * bucket(i) is the count for the bucket i.  The range for
-   * a bucket is:
-   *   i == 0:  -DBL_MAX .. bucket_limit(0)
-   *   i != 0:  bucket_limit(i-1) .. bucket_limit(i)
-   * 
- */ - public double getBucketLimit(int index) { - return bucketLimit_.get(index); - } - private int bucketLimitMemoizedSerializedSize = -1; - - public static final int BUCKET_FIELD_NUMBER = 7; - private java.util.List bucket_; - /** - * repeated double bucket = 7 [packed = true]; - */ - public java.util.List - getBucketList() { - return bucket_; - } - /** - * repeated double bucket = 7 [packed = true]; - */ - public int getBucketCount() { - return bucket_.size(); - } - /** - * repeated double bucket = 7 [packed = true]; - */ - public double getBucket(int index) { - return bucket_.get(index); - } - private int bucketMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (min_ != 0D) { - output.writeDouble(1, min_); - } - if (max_ != 0D) { - output.writeDouble(2, max_); - } - if (num_ != 0D) { - output.writeDouble(3, num_); - } - if (sum_ != 0D) { - output.writeDouble(4, sum_); - } - if (sumSquares_ != 0D) { - output.writeDouble(5, sumSquares_); - } - if (getBucketLimitList().size() > 0) { - output.writeRawVarint32(50); - output.writeRawVarint32(bucketLimitMemoizedSerializedSize); - } - for (int i = 0; i < bucketLimit_.size(); i++) { - output.writeDoubleNoTag(bucketLimit_.get(i)); - } - if (getBucketList().size() > 0) { - output.writeRawVarint32(58); - output.writeRawVarint32(bucketMemoizedSerializedSize); - } - for (int i = 0; i < bucket_.size(); i++) { - output.writeDoubleNoTag(bucket_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (min_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, min_); - } - if (max_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(2, max_); - } - if (num_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(3, num_); - } - if (sum_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(4, sum_); - } - if (sumSquares_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(5, sumSquares_); - } - { - int dataSize = 0; - dataSize = 8 * getBucketLimitList().size(); - size += dataSize; - if (!getBucketLimitList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - bucketLimitMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 8 * getBucketList().size(); - size += dataSize; - if (!getBucketList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - bucketMemoizedSerializedSize = dataSize; - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.HistogramProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.HistogramProto 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.HistogramProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.HistogramProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.HistogramProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.HistogramProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.HistogramProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.HistogramProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.HistogramProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.HistogramProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.HistogramProto 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.HistogramProto} - * - *
-   * Serialization format for histogram module in
-   * core/lib/histogram/histogram.h
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.HistogramProto) - org.tensorflow.framework.HistogramProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_HistogramProto_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_HistogramProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.HistogramProto.class, org.tensorflow.framework.HistogramProto.Builder.class); - } - - // Construct using org.tensorflow.framework.HistogramProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - min_ = 0D; - - max_ = 0D; - - num_ = 0D; - - sum_ = 0D; - - sumSquares_ = 0D; - - bucketLimit_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - bucket_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_HistogramProto_descriptor; - } - - public org.tensorflow.framework.HistogramProto getDefaultInstanceForType() { - return org.tensorflow.framework.HistogramProto.getDefaultInstance(); - } - - public org.tensorflow.framework.HistogramProto build() { - org.tensorflow.framework.HistogramProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.HistogramProto buildPartial() { - org.tensorflow.framework.HistogramProto result = new org.tensorflow.framework.HistogramProto(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.min_ = min_; - result.max_ = max_; - result.num_ = num_; - result.sum_ = sum_; - result.sumSquares_ = sumSquares_; - if (((bitField0_ & 0x00000020) == 0x00000020)) { - bucketLimit_ = java.util.Collections.unmodifiableList(bucketLimit_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.bucketLimit_ = bucketLimit_; - if (((bitField0_ & 0x00000040) == 0x00000040)) { - bucket_ = java.util.Collections.unmodifiableList(bucket_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.bucket_ = bucket_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.HistogramProto) { - return mergeFrom((org.tensorflow.framework.HistogramProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.HistogramProto other) { - if (other == org.tensorflow.framework.HistogramProto.getDefaultInstance()) return this; - if (other.getMin() != 0D) { - setMin(other.getMin()); - } - if (other.getMax() != 0D) { - setMax(other.getMax()); - } - if (other.getNum() != 0D) { - setNum(other.getNum()); - } - if (other.getSum() != 0D) { - setSum(other.getSum()); - } - if (other.getSumSquares() != 0D) { - setSumSquares(other.getSumSquares()); - } - if (!other.bucketLimit_.isEmpty()) { - if (bucketLimit_.isEmpty()) { - bucketLimit_ = other.bucketLimit_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureBucketLimitIsMutable(); - bucketLimit_.addAll(other.bucketLimit_); - } - onChanged(); - } - if (!other.bucket_.isEmpty()) { - if (bucket_.isEmpty()) { - bucket_ = other.bucket_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureBucketIsMutable(); - bucket_.addAll(other.bucket_); - } - 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.HistogramProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.HistogramProto) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private double min_ ; - /** - * optional double min = 1; - */ - public double getMin() { - return min_; - } - /** - * optional double min = 1; - */ - public Builder setMin(double value) { - - min_ = value; - onChanged(); - return this; - } - /** - * optional double min = 1; - */ - public Builder clearMin() { - - min_ = 0D; - onChanged(); - return this; - } - - private double max_ ; - /** - * optional double max = 2; - */ - public double getMax() { - return max_; - } - /** - * optional double max = 2; - */ - public Builder setMax(double value) { - - max_ = value; - onChanged(); - return this; - } - /** - * optional double max = 2; - */ - public Builder clearMax() { - - max_ = 0D; - onChanged(); - return this; - } - - private double num_ ; - /** - * optional double num = 3; - */ - public double getNum() { - return num_; - } - /** - * optional double num = 3; - */ - public Builder setNum(double value) { - - num_ = value; - onChanged(); - return this; - } - /** - * optional double num = 3; - */ - public Builder clearNum() { - - num_ = 0D; - onChanged(); - return this; - } - - private double sum_ ; - /** - * optional double sum = 4; - */ - public double getSum() { - return sum_; - } - /** - * optional double sum = 4; - */ - public Builder setSum(double value) { - - sum_ = value; - onChanged(); - return this; - } - /** - * optional double sum = 4; - */ - public Builder clearSum() { - - sum_ = 0D; - onChanged(); - return this; - } - - private double sumSquares_ ; - /** - * optional double sum_squares = 5; - */ - public double getSumSquares() { - return sumSquares_; - } - /** - * optional double sum_squares = 5; - */ - public Builder setSumSquares(double value) { - - sumSquares_ = value; - onChanged(); - return this; - } - /** - * optional double sum_squares = 5; - */ - public Builder clearSumSquares() { - - sumSquares_ = 0D; - onChanged(); - return this; - } - - private java.util.List bucketLimit_ = java.util.Collections.emptyList(); - private void ensureBucketLimitIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - bucketLimit_ = new java.util.ArrayList(bucketLimit_); - bitField0_ |= 0x00000020; - } - } - /** - * repeated double bucket_limit = 6 [packed = true]; - * - *
-     * Parallel arrays encoding the bucket boundaries and the bucket values.
-     * bucket(i) is the count for the bucket i.  The range for
-     * a bucket is:
-     *   i == 0:  -DBL_MAX .. bucket_limit(0)
-     *   i != 0:  bucket_limit(i-1) .. bucket_limit(i)
-     * 
- */ - public java.util.List - getBucketLimitList() { - return java.util.Collections.unmodifiableList(bucketLimit_); - } - /** - * repeated double bucket_limit = 6 [packed = true]; - * - *
-     * Parallel arrays encoding the bucket boundaries and the bucket values.
-     * bucket(i) is the count for the bucket i.  The range for
-     * a bucket is:
-     *   i == 0:  -DBL_MAX .. bucket_limit(0)
-     *   i != 0:  bucket_limit(i-1) .. bucket_limit(i)
-     * 
- */ - public int getBucketLimitCount() { - return bucketLimit_.size(); - } - /** - * repeated double bucket_limit = 6 [packed = true]; - * - *
-     * Parallel arrays encoding the bucket boundaries and the bucket values.
-     * bucket(i) is the count for the bucket i.  The range for
-     * a bucket is:
-     *   i == 0:  -DBL_MAX .. bucket_limit(0)
-     *   i != 0:  bucket_limit(i-1) .. bucket_limit(i)
-     * 
- */ - public double getBucketLimit(int index) { - return bucketLimit_.get(index); - } - /** - * repeated double bucket_limit = 6 [packed = true]; - * - *
-     * Parallel arrays encoding the bucket boundaries and the bucket values.
-     * bucket(i) is the count for the bucket i.  The range for
-     * a bucket is:
-     *   i == 0:  -DBL_MAX .. bucket_limit(0)
-     *   i != 0:  bucket_limit(i-1) .. bucket_limit(i)
-     * 
- */ - public Builder setBucketLimit( - int index, double value) { - ensureBucketLimitIsMutable(); - bucketLimit_.set(index, value); - onChanged(); - return this; - } - /** - * repeated double bucket_limit = 6 [packed = true]; - * - *
-     * Parallel arrays encoding the bucket boundaries and the bucket values.
-     * bucket(i) is the count for the bucket i.  The range for
-     * a bucket is:
-     *   i == 0:  -DBL_MAX .. bucket_limit(0)
-     *   i != 0:  bucket_limit(i-1) .. bucket_limit(i)
-     * 
- */ - public Builder addBucketLimit(double value) { - ensureBucketLimitIsMutable(); - bucketLimit_.add(value); - onChanged(); - return this; - } - /** - * repeated double bucket_limit = 6 [packed = true]; - * - *
-     * Parallel arrays encoding the bucket boundaries and the bucket values.
-     * bucket(i) is the count for the bucket i.  The range for
-     * a bucket is:
-     *   i == 0:  -DBL_MAX .. bucket_limit(0)
-     *   i != 0:  bucket_limit(i-1) .. bucket_limit(i)
-     * 
- */ - public Builder addAllBucketLimit( - java.lang.Iterable values) { - ensureBucketLimitIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, bucketLimit_); - onChanged(); - return this; - } - /** - * repeated double bucket_limit = 6 [packed = true]; - * - *
-     * Parallel arrays encoding the bucket boundaries and the bucket values.
-     * bucket(i) is the count for the bucket i.  The range for
-     * a bucket is:
-     *   i == 0:  -DBL_MAX .. bucket_limit(0)
-     *   i != 0:  bucket_limit(i-1) .. bucket_limit(i)
-     * 
- */ - public Builder clearBucketLimit() { - bucketLimit_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private java.util.List bucket_ = java.util.Collections.emptyList(); - private void ensureBucketIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - bucket_ = new java.util.ArrayList(bucket_); - bitField0_ |= 0x00000040; - } - } - /** - * repeated double bucket = 7 [packed = true]; - */ - public java.util.List - getBucketList() { - return java.util.Collections.unmodifiableList(bucket_); - } - /** - * repeated double bucket = 7 [packed = true]; - */ - public int getBucketCount() { - return bucket_.size(); - } - /** - * repeated double bucket = 7 [packed = true]; - */ - public double getBucket(int index) { - return bucket_.get(index); - } - /** - * repeated double bucket = 7 [packed = true]; - */ - public Builder setBucket( - int index, double value) { - ensureBucketIsMutable(); - bucket_.set(index, value); - onChanged(); - return this; - } - /** - * repeated double bucket = 7 [packed = true]; - */ - public Builder addBucket(double value) { - ensureBucketIsMutable(); - bucket_.add(value); - onChanged(); - return this; - } - /** - * repeated double bucket = 7 [packed = true]; - */ - public Builder addAllBucket( - java.lang.Iterable values) { - ensureBucketIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, bucket_); - onChanged(); - return this; - } - /** - * repeated double bucket = 7 [packed = true]; - */ - public Builder clearBucket() { - bucket_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - 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.HistogramProto) - } - - // @@protoc_insertion_point(class_scope:tensorflow.HistogramProto) - private static final org.tensorflow.framework.HistogramProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.HistogramProto(); - } - - public static org.tensorflow.framework.HistogramProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public HistogramProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new HistogramProto(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.HistogramProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/HistogramProtoOrBuilder.java b/src/main/java/org/tensorflow/framework/HistogramProtoOrBuilder.java deleted file mode 100644 index 15253f4..0000000 --- a/src/main/java/org/tensorflow/framework/HistogramProtoOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/summary.proto - -package org.tensorflow.framework; - -public interface HistogramProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.HistogramProto) - com.google.protobuf.MessageOrBuilder { - - /** - * optional double min = 1; - */ - double getMin(); - - /** - * optional double max = 2; - */ - double getMax(); - - /** - * optional double num = 3; - */ - double getNum(); - - /** - * optional double sum = 4; - */ - double getSum(); - - /** - * optional double sum_squares = 5; - */ - double getSumSquares(); - - /** - * repeated double bucket_limit = 6 [packed = true]; - * - *
-   * Parallel arrays encoding the bucket boundaries and the bucket values.
-   * bucket(i) is the count for the bucket i.  The range for
-   * a bucket is:
-   *   i == 0:  -DBL_MAX .. bucket_limit(0)
-   *   i != 0:  bucket_limit(i-1) .. bucket_limit(i)
-   * 
- */ - java.util.List getBucketLimitList(); - /** - * repeated double bucket_limit = 6 [packed = true]; - * - *
-   * Parallel arrays encoding the bucket boundaries and the bucket values.
-   * bucket(i) is the count for the bucket i.  The range for
-   * a bucket is:
-   *   i == 0:  -DBL_MAX .. bucket_limit(0)
-   *   i != 0:  bucket_limit(i-1) .. bucket_limit(i)
-   * 
- */ - int getBucketLimitCount(); - /** - * repeated double bucket_limit = 6 [packed = true]; - * - *
-   * Parallel arrays encoding the bucket boundaries and the bucket values.
-   * bucket(i) is the count for the bucket i.  The range for
-   * a bucket is:
-   *   i == 0:  -DBL_MAX .. bucket_limit(0)
-   *   i != 0:  bucket_limit(i-1) .. bucket_limit(i)
-   * 
- */ - double getBucketLimit(int index); - - /** - * repeated double bucket = 7 [packed = true]; - */ - java.util.List getBucketList(); - /** - * repeated double bucket = 7 [packed = true]; - */ - int getBucketCount(); - /** - * repeated double bucket = 7 [packed = true]; - */ - double getBucket(int index); -} diff --git a/src/main/java/org/tensorflow/framework/KernelDef.java b/src/main/java/org/tensorflow/framework/KernelDef.java deleted file mode 100644 index 950882f..0000000 --- a/src/main/java/org/tensorflow/framework/KernelDef.java +++ /dev/null @@ -1,2099 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/kernel_def.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.KernelDef} - */ -public final class KernelDef extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.KernelDef) - KernelDefOrBuilder { - // Use KernelDef.newBuilder() to construct. - private KernelDef(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private KernelDef() { - op_ = ""; - deviceType_ = ""; - constraint_ = java.util.Collections.emptyList(); - hostMemoryArg_ = com.google.protobuf.LazyStringArrayList.EMPTY; - label_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private KernelDef( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - String s = input.readStringRequireUtf8(); - - op_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - deviceType_ = s; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - constraint_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - constraint_.add(input.readMessage(org.tensorflow.framework.KernelDef.AttrConstraint.parser(), extensionRegistry)); - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - hostMemoryArg_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - hostMemoryArg_.add(s); - break; - } - case 42: { - String s = input.readStringRequireUtf8(); - - label_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - constraint_ = java.util.Collections.unmodifiableList(constraint_); - } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - hostMemoryArg_ = hostMemoryArg_.getUnmodifiableView(); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.KernelDef.class, org.tensorflow.framework.KernelDef.Builder.class); - } - - public interface AttrConstraintOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.KernelDef.AttrConstraint) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-     * Name of an attr from the Op.
-     * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-     * Name of an attr from the Op.
-     * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional .tensorflow.AttrValue allowed_values = 2; - * - *
-     * A list of values that this kernel supports for this attr.
-     * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
-     * 
- */ - boolean hasAllowedValues(); - /** - * optional .tensorflow.AttrValue allowed_values = 2; - * - *
-     * A list of values that this kernel supports for this attr.
-     * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
-     * 
- */ - org.tensorflow.framework.AttrValue getAllowedValues(); - /** - * optional .tensorflow.AttrValue allowed_values = 2; - * - *
-     * A list of values that this kernel supports for this attr.
-     * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
-     * 
- */ - org.tensorflow.framework.AttrValueOrBuilder getAllowedValuesOrBuilder(); - } - /** - * Protobuf type {@code tensorflow.KernelDef.AttrConstraint} - */ - public static final class AttrConstraint extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.KernelDef.AttrConstraint) - AttrConstraintOrBuilder { - // Use AttrConstraint.newBuilder() to construct. - private AttrConstraint(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private AttrConstraint() { - name_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private AttrConstraint( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - org.tensorflow.framework.AttrValue.Builder subBuilder = null; - if (allowedValues_ != null) { - subBuilder = allowedValues_.toBuilder(); - } - allowedValues_ = input.readMessage(org.tensorflow.framework.AttrValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(allowedValues_); - allowedValues_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_AttrConstraint_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_AttrConstraint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.KernelDef.AttrConstraint.class, org.tensorflow.framework.KernelDef.AttrConstraint.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-     * Name of an attr from the Op.
-     * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * optional string name = 1; - * - *
-     * Name of an attr from the Op.
-     * 
- */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ALLOWED_VALUES_FIELD_NUMBER = 2; - private org.tensorflow.framework.AttrValue allowedValues_; - /** - * optional .tensorflow.AttrValue allowed_values = 2; - * - *
-     * A list of values that this kernel supports for this attr.
-     * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
-     * 
- */ - public boolean hasAllowedValues() { - return allowedValues_ != null; - } - /** - * optional .tensorflow.AttrValue allowed_values = 2; - * - *
-     * A list of values that this kernel supports for this attr.
-     * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
-     * 
- */ - public org.tensorflow.framework.AttrValue getAllowedValues() { - return allowedValues_ == null ? org.tensorflow.framework.AttrValue.getDefaultInstance() : allowedValues_; - } - /** - * optional .tensorflow.AttrValue allowed_values = 2; - * - *
-     * A list of values that this kernel supports for this attr.
-     * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
-     * 
- */ - public org.tensorflow.framework.AttrValueOrBuilder getAllowedValuesOrBuilder() { - return getAllowedValues(); - } - - 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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (allowedValues_ != null) { - output.writeMessage(2, getAllowedValues()); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (allowedValues_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getAllowedValues()); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.KernelDef.AttrConstraint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.KernelDef.AttrConstraint 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.KernelDef.AttrConstraint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.KernelDef.AttrConstraint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.KernelDef.AttrConstraint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.KernelDef.AttrConstraint parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.KernelDef.AttrConstraint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.KernelDef.AttrConstraint parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.KernelDef.AttrConstraint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.KernelDef.AttrConstraint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.KernelDef.AttrConstraint 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.KernelDef.AttrConstraint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.KernelDef.AttrConstraint) - org.tensorflow.framework.KernelDef.AttrConstraintOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_AttrConstraint_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_AttrConstraint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.KernelDef.AttrConstraint.class, org.tensorflow.framework.KernelDef.AttrConstraint.Builder.class); - } - - // Construct using org.tensorflow.framework.KernelDef.AttrConstraint.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - if (allowedValuesBuilder_ == null) { - allowedValues_ = null; - } else { - allowedValues_ = null; - allowedValuesBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_AttrConstraint_descriptor; - } - - public org.tensorflow.framework.KernelDef.AttrConstraint getDefaultInstanceForType() { - return org.tensorflow.framework.KernelDef.AttrConstraint.getDefaultInstance(); - } - - public org.tensorflow.framework.KernelDef.AttrConstraint build() { - org.tensorflow.framework.KernelDef.AttrConstraint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.KernelDef.AttrConstraint buildPartial() { - org.tensorflow.framework.KernelDef.AttrConstraint result = new org.tensorflow.framework.KernelDef.AttrConstraint(this); - result.name_ = name_; - if (allowedValuesBuilder_ == null) { - result.allowedValues_ = allowedValues_; - } else { - result.allowedValues_ = allowedValuesBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.KernelDef.AttrConstraint) { - return mergeFrom((org.tensorflow.framework.KernelDef.AttrConstraint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.KernelDef.AttrConstraint other) { - if (other == org.tensorflow.framework.KernelDef.AttrConstraint.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasAllowedValues()) { - mergeAllowedValues(other.getAllowedValues()); - } - 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.KernelDef.AttrConstraint parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.KernelDef.AttrConstraint) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-       * Name of an attr from the Op.
-       * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - * - *
-       * Name of an attr from the Op.
-       * 
- */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - * - *
-       * Name of an attr from the Op.
-       * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-       * Name of an attr from the Op.
-       * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-       * Name of an attr from the Op.
-       * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private org.tensorflow.framework.AttrValue allowedValues_ = null; - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.AttrValue, org.tensorflow.framework.AttrValue.Builder, org.tensorflow.framework.AttrValueOrBuilder> allowedValuesBuilder_; - /** - * optional .tensorflow.AttrValue allowed_values = 2; - * - *
-       * A list of values that this kernel supports for this attr.
-       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
-       * 
- */ - public boolean hasAllowedValues() { - return allowedValuesBuilder_ != null || allowedValues_ != null; - } - /** - * optional .tensorflow.AttrValue allowed_values = 2; - * - *
-       * A list of values that this kernel supports for this attr.
-       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
-       * 
- */ - public org.tensorflow.framework.AttrValue getAllowedValues() { - if (allowedValuesBuilder_ == null) { - return allowedValues_ == null ? org.tensorflow.framework.AttrValue.getDefaultInstance() : allowedValues_; - } else { - return allowedValuesBuilder_.getMessage(); - } - } - /** - * optional .tensorflow.AttrValue allowed_values = 2; - * - *
-       * A list of values that this kernel supports for this attr.
-       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
-       * 
- */ - public Builder setAllowedValues(org.tensorflow.framework.AttrValue value) { - if (allowedValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - allowedValues_ = value; - onChanged(); - } else { - allowedValuesBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .tensorflow.AttrValue allowed_values = 2; - * - *
-       * A list of values that this kernel supports for this attr.
-       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
-       * 
- */ - public Builder setAllowedValues( - org.tensorflow.framework.AttrValue.Builder builderForValue) { - if (allowedValuesBuilder_ == null) { - allowedValues_ = builderForValue.build(); - onChanged(); - } else { - allowedValuesBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .tensorflow.AttrValue allowed_values = 2; - * - *
-       * A list of values that this kernel supports for this attr.
-       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
-       * 
- */ - public Builder mergeAllowedValues(org.tensorflow.framework.AttrValue value) { - if (allowedValuesBuilder_ == null) { - if (allowedValues_ != null) { - allowedValues_ = - org.tensorflow.framework.AttrValue.newBuilder(allowedValues_).mergeFrom(value).buildPartial(); - } else { - allowedValues_ = value; - } - onChanged(); - } else { - allowedValuesBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .tensorflow.AttrValue allowed_values = 2; - * - *
-       * A list of values that this kernel supports for this attr.
-       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
-       * 
- */ - public Builder clearAllowedValues() { - if (allowedValuesBuilder_ == null) { - allowedValues_ = null; - onChanged(); - } else { - allowedValues_ = null; - allowedValuesBuilder_ = null; - } - - return this; - } - /** - * optional .tensorflow.AttrValue allowed_values = 2; - * - *
-       * A list of values that this kernel supports for this attr.
-       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
-       * 
- */ - public org.tensorflow.framework.AttrValue.Builder getAllowedValuesBuilder() { - - onChanged(); - return getAllowedValuesFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.AttrValue allowed_values = 2; - * - *
-       * A list of values that this kernel supports for this attr.
-       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
-       * 
- */ - public org.tensorflow.framework.AttrValueOrBuilder getAllowedValuesOrBuilder() { - if (allowedValuesBuilder_ != null) { - return allowedValuesBuilder_.getMessageOrBuilder(); - } else { - return allowedValues_ == null ? - org.tensorflow.framework.AttrValue.getDefaultInstance() : allowedValues_; - } - } - /** - * optional .tensorflow.AttrValue allowed_values = 2; - * - *
-       * A list of values that this kernel supports for this attr.
-       * Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
-       * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.AttrValue, org.tensorflow.framework.AttrValue.Builder, org.tensorflow.framework.AttrValueOrBuilder> - getAllowedValuesFieldBuilder() { - if (allowedValuesBuilder_ == null) { - allowedValuesBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.AttrValue, org.tensorflow.framework.AttrValue.Builder, org.tensorflow.framework.AttrValueOrBuilder>( - getAllowedValues(), - getParentForChildren(), - isClean()); - allowedValues_ = null; - } - return allowedValuesBuilder_; - } - 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.KernelDef.AttrConstraint) - } - - // @@protoc_insertion_point(class_scope:tensorflow.KernelDef.AttrConstraint) - private static final org.tensorflow.framework.KernelDef.AttrConstraint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.KernelDef.AttrConstraint(); - } - - public static org.tensorflow.framework.KernelDef.AttrConstraint getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public AttrConstraint parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new AttrConstraint(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.KernelDef.AttrConstraint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int OP_FIELD_NUMBER = 1; - private volatile java.lang.Object op_; - /** - * optional string op = 1; - * - *
-   * Must match the name of an Op.
-   * 
- */ - public java.lang.String getOp() { - java.lang.Object ref = op_; - 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(); - op_ = s; - return s; - } - } - /** - * optional string op = 1; - * - *
-   * Must match the name of an Op.
-   * 
- */ - public com.google.protobuf.ByteString - getOpBytes() { - java.lang.Object ref = op_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - op_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEVICE_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object deviceType_; - /** - * optional string device_type = 2; - * - *
-   * Type of device this kernel runs on.
-   * 
- */ - public java.lang.String getDeviceType() { - java.lang.Object ref = deviceType_; - 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(); - deviceType_ = s; - return s; - } - } - /** - * optional string device_type = 2; - * - *
-   * Type of device this kernel runs on.
-   * 
- */ - public com.google.protobuf.ByteString - getDeviceTypeBytes() { - java.lang.Object ref = deviceType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - deviceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONSTRAINT_FIELD_NUMBER = 3; - private java.util.List constraint_; - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public java.util.List getConstraintList() { - return constraint_; - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public java.util.List - getConstraintOrBuilderList() { - return constraint_; - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public int getConstraintCount() { - return constraint_.size(); - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public org.tensorflow.framework.KernelDef.AttrConstraint getConstraint(int index) { - return constraint_.get(index); - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public org.tensorflow.framework.KernelDef.AttrConstraintOrBuilder getConstraintOrBuilder( - int index) { - return constraint_.get(index); - } - - public static final int HOST_MEMORY_ARG_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList hostMemoryArg_; - /** - * repeated string host_memory_arg = 4; - * - *
-   * Names of the Op's input_/output_args that reside in host memory
-   * instead of device memory.
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getHostMemoryArgList() { - return hostMemoryArg_; - } - /** - * repeated string host_memory_arg = 4; - * - *
-   * Names of the Op's input_/output_args that reside in host memory
-   * instead of device memory.
-   * 
- */ - public int getHostMemoryArgCount() { - return hostMemoryArg_.size(); - } - /** - * repeated string host_memory_arg = 4; - * - *
-   * Names of the Op's input_/output_args that reside in host memory
-   * instead of device memory.
-   * 
- */ - public java.lang.String getHostMemoryArg(int index) { - return hostMemoryArg_.get(index); - } - /** - * repeated string host_memory_arg = 4; - * - *
-   * Names of the Op's input_/output_args that reside in host memory
-   * instead of device memory.
-   * 
- */ - public com.google.protobuf.ByteString - getHostMemoryArgBytes(int index) { - return hostMemoryArg_.getByteString(index); - } - - public static final int LABEL_FIELD_NUMBER = 5; - private volatile java.lang.Object label_; - /** - * optional string label = 5; - * - *
-   * This allows experimental kernels to be registered for an op that
-   * won't be used unless the user specifies a "_kernel" attr with
-   * value matching this.
-   * 
- */ - public java.lang.String getLabel() { - java.lang.Object ref = label_; - 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(); - label_ = s; - return s; - } - } - /** - * optional string label = 5; - * - *
-   * This allows experimental kernels to be registered for an op that
-   * won't be used unless the user specifies a "_kernel" attr with
-   * value matching this.
-   * 
- */ - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = 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 (!getOpBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, op_); - } - if (!getDeviceTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, deviceType_); - } - for (int i = 0; i < constraint_.size(); i++) { - output.writeMessage(3, constraint_.get(i)); - } - for (int i = 0; i < hostMemoryArg_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, hostMemoryArg_.getRaw(i)); - } - if (!getLabelBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, label_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getOpBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, op_); - } - if (!getDeviceTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, deviceType_); - } - for (int i = 0; i < constraint_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, constraint_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < hostMemoryArg_.size(); i++) { - dataSize += computeStringSizeNoTag(hostMemoryArg_.getRaw(i)); - } - size += dataSize; - size += 1 * getHostMemoryArgList().size(); - } - if (!getLabelBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(5, label_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.KernelDef parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.KernelDef 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.KernelDef parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.KernelDef parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.KernelDef parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.KernelDef parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.KernelDef parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.KernelDef parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.KernelDef parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.KernelDef parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.KernelDef 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.KernelDef} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.KernelDef) - org.tensorflow.framework.KernelDefOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.KernelDef.class, org.tensorflow.framework.KernelDef.Builder.class); - } - - // Construct using org.tensorflow.framework.KernelDef.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getConstraintFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - op_ = ""; - - deviceType_ = ""; - - if (constraintBuilder_ == null) { - constraint_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - constraintBuilder_.clear(); - } - hostMemoryArg_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - label_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_descriptor; - } - - public org.tensorflow.framework.KernelDef getDefaultInstanceForType() { - return org.tensorflow.framework.KernelDef.getDefaultInstance(); - } - - public org.tensorflow.framework.KernelDef build() { - org.tensorflow.framework.KernelDef result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.KernelDef buildPartial() { - org.tensorflow.framework.KernelDef result = new org.tensorflow.framework.KernelDef(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.op_ = op_; - result.deviceType_ = deviceType_; - if (constraintBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - constraint_ = java.util.Collections.unmodifiableList(constraint_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.constraint_ = constraint_; - } else { - result.constraint_ = constraintBuilder_.build(); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - hostMemoryArg_ = hostMemoryArg_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.hostMemoryArg_ = hostMemoryArg_; - result.label_ = label_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.KernelDef) { - return mergeFrom((org.tensorflow.framework.KernelDef)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.KernelDef other) { - if (other == org.tensorflow.framework.KernelDef.getDefaultInstance()) return this; - if (!other.getOp().isEmpty()) { - op_ = other.op_; - onChanged(); - } - if (!other.getDeviceType().isEmpty()) { - deviceType_ = other.deviceType_; - onChanged(); - } - if (constraintBuilder_ == null) { - if (!other.constraint_.isEmpty()) { - if (constraint_.isEmpty()) { - constraint_ = other.constraint_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureConstraintIsMutable(); - constraint_.addAll(other.constraint_); - } - onChanged(); - } - } else { - if (!other.constraint_.isEmpty()) { - if (constraintBuilder_.isEmpty()) { - constraintBuilder_.dispose(); - constraintBuilder_ = null; - constraint_ = other.constraint_; - bitField0_ = (bitField0_ & ~0x00000004); - constraintBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getConstraintFieldBuilder() : null; - } else { - constraintBuilder_.addAllMessages(other.constraint_); - } - } - } - if (!other.hostMemoryArg_.isEmpty()) { - if (hostMemoryArg_.isEmpty()) { - hostMemoryArg_ = other.hostMemoryArg_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureHostMemoryArgIsMutable(); - hostMemoryArg_.addAll(other.hostMemoryArg_); - } - onChanged(); - } - if (!other.getLabel().isEmpty()) { - label_ = other.label_; - 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.KernelDef parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.KernelDef) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object op_ = ""; - /** - * optional string op = 1; - * - *
-     * Must match the name of an Op.
-     * 
- */ - public java.lang.String getOp() { - java.lang.Object ref = op_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - op_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string op = 1; - * - *
-     * Must match the name of an Op.
-     * 
- */ - public com.google.protobuf.ByteString - getOpBytes() { - java.lang.Object ref = op_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - op_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string op = 1; - * - *
-     * Must match the name of an Op.
-     * 
- */ - public Builder setOp( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - op_ = value; - onChanged(); - return this; - } - /** - * optional string op = 1; - * - *
-     * Must match the name of an Op.
-     * 
- */ - public Builder clearOp() { - - op_ = getDefaultInstance().getOp(); - onChanged(); - return this; - } - /** - * optional string op = 1; - * - *
-     * Must match the name of an Op.
-     * 
- */ - public Builder setOpBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - op_ = value; - onChanged(); - return this; - } - - private java.lang.Object deviceType_ = ""; - /** - * optional string device_type = 2; - * - *
-     * Type of device this kernel runs on.
-     * 
- */ - public java.lang.String getDeviceType() { - java.lang.Object ref = deviceType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - deviceType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string device_type = 2; - * - *
-     * Type of device this kernel runs on.
-     * 
- */ - public com.google.protobuf.ByteString - getDeviceTypeBytes() { - java.lang.Object ref = deviceType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - deviceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string device_type = 2; - * - *
-     * Type of device this kernel runs on.
-     * 
- */ - public Builder setDeviceType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - deviceType_ = value; - onChanged(); - return this; - } - /** - * optional string device_type = 2; - * - *
-     * Type of device this kernel runs on.
-     * 
- */ - public Builder clearDeviceType() { - - deviceType_ = getDefaultInstance().getDeviceType(); - onChanged(); - return this; - } - /** - * optional string device_type = 2; - * - *
-     * Type of device this kernel runs on.
-     * 
- */ - public Builder setDeviceTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - deviceType_ = value; - onChanged(); - return this; - } - - private java.util.List constraint_ = - java.util.Collections.emptyList(); - private void ensureConstraintIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - constraint_ = new java.util.ArrayList(constraint_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.KernelDef.AttrConstraint, org.tensorflow.framework.KernelDef.AttrConstraint.Builder, org.tensorflow.framework.KernelDef.AttrConstraintOrBuilder> constraintBuilder_; - - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public java.util.List getConstraintList() { - if (constraintBuilder_ == null) { - return java.util.Collections.unmodifiableList(constraint_); - } else { - return constraintBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public int getConstraintCount() { - if (constraintBuilder_ == null) { - return constraint_.size(); - } else { - return constraintBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public org.tensorflow.framework.KernelDef.AttrConstraint getConstraint(int index) { - if (constraintBuilder_ == null) { - return constraint_.get(index); - } else { - return constraintBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public Builder setConstraint( - int index, org.tensorflow.framework.KernelDef.AttrConstraint value) { - if (constraintBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConstraintIsMutable(); - constraint_.set(index, value); - onChanged(); - } else { - constraintBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public Builder setConstraint( - int index, org.tensorflow.framework.KernelDef.AttrConstraint.Builder builderForValue) { - if (constraintBuilder_ == null) { - ensureConstraintIsMutable(); - constraint_.set(index, builderForValue.build()); - onChanged(); - } else { - constraintBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public Builder addConstraint(org.tensorflow.framework.KernelDef.AttrConstraint value) { - if (constraintBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConstraintIsMutable(); - constraint_.add(value); - onChanged(); - } else { - constraintBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public Builder addConstraint( - int index, org.tensorflow.framework.KernelDef.AttrConstraint value) { - if (constraintBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConstraintIsMutable(); - constraint_.add(index, value); - onChanged(); - } else { - constraintBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public Builder addConstraint( - org.tensorflow.framework.KernelDef.AttrConstraint.Builder builderForValue) { - if (constraintBuilder_ == null) { - ensureConstraintIsMutable(); - constraint_.add(builderForValue.build()); - onChanged(); - } else { - constraintBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public Builder addConstraint( - int index, org.tensorflow.framework.KernelDef.AttrConstraint.Builder builderForValue) { - if (constraintBuilder_ == null) { - ensureConstraintIsMutable(); - constraint_.add(index, builderForValue.build()); - onChanged(); - } else { - constraintBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public Builder addAllConstraint( - java.lang.Iterable values) { - if (constraintBuilder_ == null) { - ensureConstraintIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, constraint_); - onChanged(); - } else { - constraintBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public Builder clearConstraint() { - if (constraintBuilder_ == null) { - constraint_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - constraintBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public Builder removeConstraint(int index) { - if (constraintBuilder_ == null) { - ensureConstraintIsMutable(); - constraint_.remove(index); - onChanged(); - } else { - constraintBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public org.tensorflow.framework.KernelDef.AttrConstraint.Builder getConstraintBuilder( - int index) { - return getConstraintFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public org.tensorflow.framework.KernelDef.AttrConstraintOrBuilder getConstraintOrBuilder( - int index) { - if (constraintBuilder_ == null) { - return constraint_.get(index); } else { - return constraintBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public java.util.List - getConstraintOrBuilderList() { - if (constraintBuilder_ != null) { - return constraintBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(constraint_); - } - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public org.tensorflow.framework.KernelDef.AttrConstraint.Builder addConstraintBuilder() { - return getConstraintFieldBuilder().addBuilder( - org.tensorflow.framework.KernelDef.AttrConstraint.getDefaultInstance()); - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public org.tensorflow.framework.KernelDef.AttrConstraint.Builder addConstraintBuilder( - int index) { - return getConstraintFieldBuilder().addBuilder( - index, org.tensorflow.framework.KernelDef.AttrConstraint.getDefaultInstance()); - } - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - public java.util.List - getConstraintBuilderList() { - return getConstraintFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.KernelDef.AttrConstraint, org.tensorflow.framework.KernelDef.AttrConstraint.Builder, org.tensorflow.framework.KernelDef.AttrConstraintOrBuilder> - getConstraintFieldBuilder() { - if (constraintBuilder_ == null) { - constraintBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.KernelDef.AttrConstraint, org.tensorflow.framework.KernelDef.AttrConstraint.Builder, org.tensorflow.framework.KernelDef.AttrConstraintOrBuilder>( - constraint_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - constraint_ = null; - } - return constraintBuilder_; - } - - private com.google.protobuf.LazyStringList hostMemoryArg_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureHostMemoryArgIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - hostMemoryArg_ = new com.google.protobuf.LazyStringArrayList(hostMemoryArg_); - bitField0_ |= 0x00000008; - } - } - /** - * repeated string host_memory_arg = 4; - * - *
-     * Names of the Op's input_/output_args that reside in host memory
-     * instead of device memory.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getHostMemoryArgList() { - return hostMemoryArg_.getUnmodifiableView(); - } - /** - * repeated string host_memory_arg = 4; - * - *
-     * Names of the Op's input_/output_args that reside in host memory
-     * instead of device memory.
-     * 
- */ - public int getHostMemoryArgCount() { - return hostMemoryArg_.size(); - } - /** - * repeated string host_memory_arg = 4; - * - *
-     * Names of the Op's input_/output_args that reside in host memory
-     * instead of device memory.
-     * 
- */ - public java.lang.String getHostMemoryArg(int index) { - return hostMemoryArg_.get(index); - } - /** - * repeated string host_memory_arg = 4; - * - *
-     * Names of the Op's input_/output_args that reside in host memory
-     * instead of device memory.
-     * 
- */ - public com.google.protobuf.ByteString - getHostMemoryArgBytes(int index) { - return hostMemoryArg_.getByteString(index); - } - /** - * repeated string host_memory_arg = 4; - * - *
-     * Names of the Op's input_/output_args that reside in host memory
-     * instead of device memory.
-     * 
- */ - public Builder setHostMemoryArg( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureHostMemoryArgIsMutable(); - hostMemoryArg_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string host_memory_arg = 4; - * - *
-     * Names of the Op's input_/output_args that reside in host memory
-     * instead of device memory.
-     * 
- */ - public Builder addHostMemoryArg( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureHostMemoryArgIsMutable(); - hostMemoryArg_.add(value); - onChanged(); - return this; - } - /** - * repeated string host_memory_arg = 4; - * - *
-     * Names of the Op's input_/output_args that reside in host memory
-     * instead of device memory.
-     * 
- */ - public Builder addAllHostMemoryArg( - java.lang.Iterable values) { - ensureHostMemoryArgIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, hostMemoryArg_); - onChanged(); - return this; - } - /** - * repeated string host_memory_arg = 4; - * - *
-     * Names of the Op's input_/output_args that reside in host memory
-     * instead of device memory.
-     * 
- */ - public Builder clearHostMemoryArg() { - hostMemoryArg_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * repeated string host_memory_arg = 4; - * - *
-     * Names of the Op's input_/output_args that reside in host memory
-     * instead of device memory.
-     * 
- */ - public Builder addHostMemoryArgBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureHostMemoryArgIsMutable(); - hostMemoryArg_.add(value); - onChanged(); - return this; - } - - private java.lang.Object label_ = ""; - /** - * optional string label = 5; - * - *
-     * This allows experimental kernels to be registered for an op that
-     * won't be used unless the user specifies a "_kernel" attr with
-     * value matching this.
-     * 
- */ - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string label = 5; - * - *
-     * This allows experimental kernels to be registered for an op that
-     * won't be used unless the user specifies a "_kernel" attr with
-     * value matching this.
-     * 
- */ - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string label = 5; - * - *
-     * This allows experimental kernels to be registered for an op that
-     * won't be used unless the user specifies a "_kernel" attr with
-     * value matching this.
-     * 
- */ - public Builder setLabel( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - label_ = value; - onChanged(); - return this; - } - /** - * optional string label = 5; - * - *
-     * This allows experimental kernels to be registered for an op that
-     * won't be used unless the user specifies a "_kernel" attr with
-     * value matching this.
-     * 
- */ - public Builder clearLabel() { - - label_ = getDefaultInstance().getLabel(); - onChanged(); - return this; - } - /** - * optional string label = 5; - * - *
-     * This allows experimental kernels to be registered for an op that
-     * won't be used unless the user specifies a "_kernel" attr with
-     * value matching this.
-     * 
- */ - public Builder setLabelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - label_ = 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.KernelDef) - } - - // @@protoc_insertion_point(class_scope:tensorflow.KernelDef) - private static final org.tensorflow.framework.KernelDef DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.KernelDef(); - } - - public static org.tensorflow.framework.KernelDef getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public KernelDef parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new KernelDef(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.KernelDef getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/KernelDefOrBuilder.java b/src/main/java/org/tensorflow/framework/KernelDefOrBuilder.java deleted file mode 100644 index 3fb9866..0000000 --- a/src/main/java/org/tensorflow/framework/KernelDefOrBuilder.java +++ /dev/null @@ -1,130 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/kernel_def.proto - -package org.tensorflow.framework; - -public interface KernelDefOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.KernelDef) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string op = 1; - * - *
-   * Must match the name of an Op.
-   * 
- */ - java.lang.String getOp(); - /** - * optional string op = 1; - * - *
-   * Must match the name of an Op.
-   * 
- */ - com.google.protobuf.ByteString - getOpBytes(); - - /** - * optional string device_type = 2; - * - *
-   * Type of device this kernel runs on.
-   * 
- */ - java.lang.String getDeviceType(); - /** - * optional string device_type = 2; - * - *
-   * Type of device this kernel runs on.
-   * 
- */ - com.google.protobuf.ByteString - getDeviceTypeBytes(); - - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - java.util.List - getConstraintList(); - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - org.tensorflow.framework.KernelDef.AttrConstraint getConstraint(int index); - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - int getConstraintCount(); - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - java.util.List - getConstraintOrBuilderList(); - /** - * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3; - */ - org.tensorflow.framework.KernelDef.AttrConstraintOrBuilder getConstraintOrBuilder( - int index); - - /** - * repeated string host_memory_arg = 4; - * - *
-   * Names of the Op's input_/output_args that reside in host memory
-   * instead of device memory.
-   * 
- */ - com.google.protobuf.ProtocolStringList - getHostMemoryArgList(); - /** - * repeated string host_memory_arg = 4; - * - *
-   * Names of the Op's input_/output_args that reside in host memory
-   * instead of device memory.
-   * 
- */ - int getHostMemoryArgCount(); - /** - * repeated string host_memory_arg = 4; - * - *
-   * Names of the Op's input_/output_args that reside in host memory
-   * instead of device memory.
-   * 
- */ - java.lang.String getHostMemoryArg(int index); - /** - * repeated string host_memory_arg = 4; - * - *
-   * Names of the Op's input_/output_args that reside in host memory
-   * instead of device memory.
-   * 
- */ - com.google.protobuf.ByteString - getHostMemoryArgBytes(int index); - - /** - * optional string label = 5; - * - *
-   * This allows experimental kernels to be registered for an op that
-   * won't be used unless the user specifies a "_kernel" attr with
-   * value matching this.
-   * 
- */ - java.lang.String getLabel(); - /** - * optional string label = 5; - * - *
-   * This allows experimental kernels to be registered for an op that
-   * won't be used unless the user specifies a "_kernel" attr with
-   * value matching this.
-   * 
- */ - com.google.protobuf.ByteString - getLabelBytes(); -} diff --git a/src/main/java/org/tensorflow/framework/KernelDefProtos.java b/src/main/java/org/tensorflow/framework/KernelDefProtos.java deleted file mode 100644 index 37ac62f..0000000 --- a/src/main/java/org/tensorflow/framework/KernelDefProtos.java +++ /dev/null @@ -1,70 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/kernel_def.proto - -package org.tensorflow.framework; - -public final class KernelDefProtos { - private KernelDefProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_KernelDef_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_KernelDef_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_KernelDef_AttrConstraint_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_KernelDef_AttrConstraint_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n*tensorflow/core/framework/kernel_def.p" + - "roto\022\ntensorflow\032*tensorflow/core/framew" + - "ork/attr_value.proto\"\335\001\n\tKernelDef\022\n\n\002op" + - "\030\001 \001(\t\022\023\n\013device_type\030\002 \001(\t\0228\n\nconstrain" + - "t\030\003 \003(\0132$.tensorflow.KernelDef.AttrConst" + - "raint\022\027\n\017host_memory_arg\030\004 \003(\t\022\r\n\005label\030" + - "\005 \001(\t\032M\n\016AttrConstraint\022\014\n\004name\030\001 \001(\t\022-\n" + - "\016allowed_values\030\002 \001(\0132\025.tensorflow.AttrV" + - "alueB-\n\030org.tensorflow.frameworkB\017Kernel" + - "DefProtosP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - org.tensorflow.framework.AttrValueProtos.getDescriptor(), - }, assigner); - internal_static_tensorflow_KernelDef_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_tensorflow_KernelDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_KernelDef_descriptor, - new java.lang.String[] { "Op", "DeviceType", "Constraint", "HostMemoryArg", "Label", }); - internal_static_tensorflow_KernelDef_AttrConstraint_descriptor = - internal_static_tensorflow_KernelDef_descriptor.getNestedTypes().get(0); - internal_static_tensorflow_KernelDef_AttrConstraint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_KernelDef_AttrConstraint_descriptor, - new java.lang.String[] { "Name", "AllowedValues", }); - org.tensorflow.framework.AttrValueProtos.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/org/tensorflow/framework/NameAttrList.java b/src/main/java/org/tensorflow/framework/NameAttrList.java deleted file mode 100644 index edcbe2d..0000000 --- a/src/main/java/org/tensorflow/framework/NameAttrList.java +++ /dev/null @@ -1,598 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/attr_value.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.NameAttrList} - * - *
- * A list of attr names and their values. The whole list is attached
- * with a string name.  E.g., MatMul[T=float].
- * 
- */ -public final class NameAttrList extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.NameAttrList) - NameAttrListOrBuilder { - // Use NameAttrList.newBuilder() to construct. - private NameAttrList(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private NameAttrList() { - name_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private NameAttrList( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - attr_ = com.google.protobuf.MapField.newMapField( - AttrDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - attr = input.readMessage( - AttrDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - attr_.getMutableMap().put(attr.getKey(), attr.getValue()); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_NameAttrList_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetAttr(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_NameAttrList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.NameAttrList.class, org.tensorflow.framework.NameAttrList.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ATTR_FIELD_NUMBER = 2; - private static final class AttrDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, org.tensorflow.framework.AttrValue> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_NameAttrList_AttrEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - org.tensorflow.framework.AttrValue.getDefaultInstance()); - } - private com.google.protobuf.MapField< - java.lang.String, org.tensorflow.framework.AttrValue> attr_; - private com.google.protobuf.MapField - internalGetAttr() { - if (attr_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttrDefaultEntryHolder.defaultEntry); - } - return attr_; - } - /** - * map<string, .tensorflow.AttrValue> attr = 2; - */ - - public java.util.Map getAttr() { - return internalGetAttr().getMap(); - } - - 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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - for (java.util.Map.Entry entry - : internalGetAttr().getMap().entrySet()) { - com.google.protobuf.MapEntry - attr = AttrDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - output.writeMessage(2, attr); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - for (java.util.Map.Entry entry - : internalGetAttr().getMap().entrySet()) { - com.google.protobuf.MapEntry - attr = AttrDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, attr); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.NameAttrList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.NameAttrList 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.NameAttrList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.NameAttrList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.NameAttrList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.NameAttrList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.NameAttrList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.NameAttrList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.NameAttrList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.NameAttrList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.NameAttrList 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.NameAttrList} - * - *
-   * A list of attr names and their values. The whole list is attached
-   * with a string name.  E.g., MatMul[T=float].
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.NameAttrList) - org.tensorflow.framework.NameAttrListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_NameAttrList_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetAttr(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableAttr(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_NameAttrList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.NameAttrList.class, org.tensorflow.framework.NameAttrList.Builder.class); - } - - // Construct using org.tensorflow.framework.NameAttrList.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - internalGetMutableAttr().clear(); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_NameAttrList_descriptor; - } - - public org.tensorflow.framework.NameAttrList getDefaultInstanceForType() { - return org.tensorflow.framework.NameAttrList.getDefaultInstance(); - } - - public org.tensorflow.framework.NameAttrList build() { - org.tensorflow.framework.NameAttrList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.NameAttrList buildPartial() { - org.tensorflow.framework.NameAttrList result = new org.tensorflow.framework.NameAttrList(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.name_ = name_; - result.attr_ = internalGetAttr(); - result.attr_.makeImmutable(); - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.NameAttrList) { - return mergeFrom((org.tensorflow.framework.NameAttrList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.NameAttrList other) { - if (other == org.tensorflow.framework.NameAttrList.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - internalGetMutableAttr().mergeFrom( - other.internalGetAttr()); - 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.NameAttrList parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.NameAttrList) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, org.tensorflow.framework.AttrValue> attr_; - private com.google.protobuf.MapField - internalGetAttr() { - if (attr_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttrDefaultEntryHolder.defaultEntry); - } - return attr_; - } - private com.google.protobuf.MapField - internalGetMutableAttr() { - onChanged();; - if (attr_ == null) { - attr_ = com.google.protobuf.MapField.newMapField( - AttrDefaultEntryHolder.defaultEntry); - } - if (!attr_.isMutable()) { - attr_ = attr_.copy(); - } - return attr_; - } - /** - * map<string, .tensorflow.AttrValue> attr = 2; - */ - public java.util.Map getAttr() { - return internalGetAttr().getMap(); - } - /** - * map<string, .tensorflow.AttrValue> attr = 2; - */ - public java.util.Map - getMutableAttr() { - return internalGetMutableAttr().getMutableMap(); - } - /** - * map<string, .tensorflow.AttrValue> attr = 2; - */ - public Builder putAllAttr( - java.util.Map values) { - getMutableAttr().putAll(values); - 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.NameAttrList) - } - - // @@protoc_insertion_point(class_scope:tensorflow.NameAttrList) - private static final org.tensorflow.framework.NameAttrList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.NameAttrList(); - } - - public static org.tensorflow.framework.NameAttrList getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public NameAttrList parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new NameAttrList(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.NameAttrList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/NameAttrListOrBuilder.java b/src/main/java/org/tensorflow/framework/NameAttrListOrBuilder.java deleted file mode 100644 index e809aa9..0000000 --- a/src/main/java/org/tensorflow/framework/NameAttrListOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/attr_value.proto - -package org.tensorflow.framework; - -public interface NameAttrListOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.NameAttrList) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - */ - java.lang.String getName(); - /** - * optional string name = 1; - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * map<string, .tensorflow.AttrValue> attr = 2; - */ - java.util.Map - getAttr(); -} diff --git a/src/main/java/org/tensorflow/framework/NodeDef.java b/src/main/java/org/tensorflow/framework/NodeDef.java deleted file mode 100644 index 72ab125..0000000 --- a/src/main/java/org/tensorflow/framework/NodeDef.java +++ /dev/null @@ -1,1386 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/graph.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.NodeDef} - */ -public final class NodeDef extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.NodeDef) - NodeDefOrBuilder { - // Use NodeDef.newBuilder() to construct. - private NodeDef(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private NodeDef() { - name_ = ""; - op_ = ""; - input_ = com.google.protobuf.LazyStringArrayList.EMPTY; - device_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private NodeDef( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - op_ = s; - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - input_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - input_.add(s); - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - - device_ = s; - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - attr_ = com.google.protobuf.MapField.newMapField( - AttrDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000010; - } - com.google.protobuf.MapEntry - attr = input.readMessage( - AttrDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - attr_.getMutableMap().put(attr.getKey(), attr.getValue()); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - input_ = input_.getUnmodifiableView(); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.GraphProtos.internal_static_tensorflow_NodeDef_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 5: - return internalGetAttr(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.GraphProtos.internal_static_tensorflow_NodeDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.NodeDef.class, org.tensorflow.framework.NodeDef.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-   * The name given to this operator. Used for naming inputs,
-   * logging, visualization, etc.  Unique within a single GraphDef.
-   * Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
-   * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * optional string name = 1; - * - *
-   * The name given to this operator. Used for naming inputs,
-   * logging, visualization, etc.  Unique within a single GraphDef.
-   * Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
-   * 
- */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OP_FIELD_NUMBER = 2; - private volatile java.lang.Object op_; - /** - * optional string op = 2; - * - *
-   * The operation name.  There may be custom parameters in attrs.
-   * Op names starting with an underscore are reserved for internal use.
-   * 
- */ - public java.lang.String getOp() { - java.lang.Object ref = op_; - 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(); - op_ = s; - return s; - } - } - /** - * optional string op = 2; - * - *
-   * The operation name.  There may be custom parameters in attrs.
-   * Op names starting with an underscore are reserved for internal use.
-   * 
- */ - public com.google.protobuf.ByteString - getOpBytes() { - java.lang.Object ref = op_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - op_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INPUT_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList input_; - /** - * repeated string input = 3; - * - *
-   * Each input is "node:src_output" with "node" being a string name and
-   * "src_output" indicating which output tensor to use from "node". If
-   * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-   * may optionally be followed by control inputs that have the format
-   * "^node".
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getInputList() { - return input_; - } - /** - * repeated string input = 3; - * - *
-   * Each input is "node:src_output" with "node" being a string name and
-   * "src_output" indicating which output tensor to use from "node". If
-   * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-   * may optionally be followed by control inputs that have the format
-   * "^node".
-   * 
- */ - public int getInputCount() { - return input_.size(); - } - /** - * repeated string input = 3; - * - *
-   * Each input is "node:src_output" with "node" being a string name and
-   * "src_output" indicating which output tensor to use from "node". If
-   * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-   * may optionally be followed by control inputs that have the format
-   * "^node".
-   * 
- */ - public java.lang.String getInput(int index) { - return input_.get(index); - } - /** - * repeated string input = 3; - * - *
-   * Each input is "node:src_output" with "node" being a string name and
-   * "src_output" indicating which output tensor to use from "node". If
-   * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-   * may optionally be followed by control inputs that have the format
-   * "^node".
-   * 
- */ - public com.google.protobuf.ByteString - getInputBytes(int index) { - return input_.getByteString(index); - } - - public static final int DEVICE_FIELD_NUMBER = 4; - private volatile java.lang.Object device_; - /** - * optional string device = 4; - * - *
-   * A (possibly partial) specification for the device on which this
-   * node should be placed.
-   * The expected syntax for this string is as follows:
-   * DEVICE_SPEC ::= COLOCATED_NODE | PARTIAL_SPEC
-   * COLOCATED_NODE ::= "@" NODE_NAME  // See NodeDef.name above.
-   * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
-   * CONSTRAINT ::= ("job:" JOB_NAME)
-   *              | ("replica:" [1-9][0-9]*)
-   *              | ("task:" [1-9][0-9]*)
-   *              | ( ("gpu" | "cpu") ":" ([1-9][0-9]* | "*") )
-   * Valid values for this string include:
-   * * "@other/node"                         (colocate with "other/node")
-   * * "/job:worker/replica:0/task:1/gpu:3"  (full specification)
-   * * "/job:worker/gpu:3"                   (partial specification)
-   * * ""                                    (no specification)
-   * If the constraints do not resolve to a single device (or if this
-   * field is empty or not present), the runtime will attempt to
-   * choose a device automatically.
-   * 
- */ - public java.lang.String getDevice() { - java.lang.Object ref = device_; - 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(); - device_ = s; - return s; - } - } - /** - * optional string device = 4; - * - *
-   * A (possibly partial) specification for the device on which this
-   * node should be placed.
-   * The expected syntax for this string is as follows:
-   * DEVICE_SPEC ::= COLOCATED_NODE | PARTIAL_SPEC
-   * COLOCATED_NODE ::= "@" NODE_NAME  // See NodeDef.name above.
-   * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
-   * CONSTRAINT ::= ("job:" JOB_NAME)
-   *              | ("replica:" [1-9][0-9]*)
-   *              | ("task:" [1-9][0-9]*)
-   *              | ( ("gpu" | "cpu") ":" ([1-9][0-9]* | "*") )
-   * Valid values for this string include:
-   * * "@other/node"                         (colocate with "other/node")
-   * * "/job:worker/replica:0/task:1/gpu:3"  (full specification)
-   * * "/job:worker/gpu:3"                   (partial specification)
-   * * ""                                    (no specification)
-   * If the constraints do not resolve to a single device (or if this
-   * field is empty or not present), the runtime will attempt to
-   * choose a device automatically.
-   * 
- */ - public com.google.protobuf.ByteString - getDeviceBytes() { - java.lang.Object ref = device_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - device_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ATTR_FIELD_NUMBER = 5; - private static final class AttrDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, org.tensorflow.framework.AttrValue> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - org.tensorflow.framework.GraphProtos.internal_static_tensorflow_NodeDef_AttrEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - org.tensorflow.framework.AttrValue.getDefaultInstance()); - } - private com.google.protobuf.MapField< - java.lang.String, org.tensorflow.framework.AttrValue> attr_; - private com.google.protobuf.MapField - internalGetAttr() { - if (attr_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttrDefaultEntryHolder.defaultEntry); - } - return attr_; - } - /** - * map<string, .tensorflow.AttrValue> attr = 5; - * - *
-   * Operation-specific graph-construction-time configuration.
-   * Note that this should include all attrs defined in the
-   * corresponding OpDef, including those with a value matching
-   * the default -- this allows the default to change and makes
-   * NodeDefs easier to interpret on their own.  However, if
-   * an attr with a default is not specified in this list, the
-   * default will be used.
-   * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
-   * one of the names from the corresponding OpDef's attr field).
-   * The values must have a type matching the corresponding OpDef
-   * attr's type field.
-   * TODO(josh11b): Add some examples here showing best practices.
-   * 
- */ - - public java.util.Map getAttr() { - return internalGetAttr().getMap(); - } - - 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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (!getOpBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, op_); - } - for (int i = 0; i < input_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, input_.getRaw(i)); - } - if (!getDeviceBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, device_); - } - for (java.util.Map.Entry entry - : internalGetAttr().getMap().entrySet()) { - com.google.protobuf.MapEntry - attr = AttrDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - output.writeMessage(5, attr); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (!getOpBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, op_); - } - { - int dataSize = 0; - for (int i = 0; i < input_.size(); i++) { - dataSize += computeStringSizeNoTag(input_.getRaw(i)); - } - size += dataSize; - size += 1 * getInputList().size(); - } - if (!getDeviceBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, device_); - } - for (java.util.Map.Entry entry - : internalGetAttr().getMap().entrySet()) { - com.google.protobuf.MapEntry - attr = AttrDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, attr); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.NodeDef parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.NodeDef 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.NodeDef parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.NodeDef parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.NodeDef parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.NodeDef parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.NodeDef parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.NodeDef parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.NodeDef parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.NodeDef parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.NodeDef 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.NodeDef} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.NodeDef) - org.tensorflow.framework.NodeDefOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.GraphProtos.internal_static_tensorflow_NodeDef_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 5: - return internalGetAttr(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 5: - return internalGetMutableAttr(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.GraphProtos.internal_static_tensorflow_NodeDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.NodeDef.class, org.tensorflow.framework.NodeDef.Builder.class); - } - - // Construct using org.tensorflow.framework.NodeDef.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - op_ = ""; - - input_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - device_ = ""; - - internalGetMutableAttr().clear(); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.GraphProtos.internal_static_tensorflow_NodeDef_descriptor; - } - - public org.tensorflow.framework.NodeDef getDefaultInstanceForType() { - return org.tensorflow.framework.NodeDef.getDefaultInstance(); - } - - public org.tensorflow.framework.NodeDef build() { - org.tensorflow.framework.NodeDef result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.NodeDef buildPartial() { - org.tensorflow.framework.NodeDef result = new org.tensorflow.framework.NodeDef(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.name_ = name_; - result.op_ = op_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - input_ = input_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.input_ = input_; - result.device_ = device_; - result.attr_ = internalGetAttr(); - result.attr_.makeImmutable(); - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.NodeDef) { - return mergeFrom((org.tensorflow.framework.NodeDef)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.NodeDef other) { - if (other == org.tensorflow.framework.NodeDef.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getOp().isEmpty()) { - op_ = other.op_; - onChanged(); - } - if (!other.input_.isEmpty()) { - if (input_.isEmpty()) { - input_ = other.input_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureInputIsMutable(); - input_.addAll(other.input_); - } - onChanged(); - } - if (!other.getDevice().isEmpty()) { - device_ = other.device_; - onChanged(); - } - internalGetMutableAttr().mergeFrom( - other.internalGetAttr()); - 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.NodeDef parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.NodeDef) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-     * The name given to this operator. Used for naming inputs,
-     * logging, visualization, etc.  Unique within a single GraphDef.
-     * Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
-     * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - * - *
-     * The name given to this operator. Used for naming inputs,
-     * logging, visualization, etc.  Unique within a single GraphDef.
-     * Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
-     * 
- */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - * - *
-     * The name given to this operator. Used for naming inputs,
-     * logging, visualization, etc.  Unique within a single GraphDef.
-     * Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name given to this operator. Used for naming inputs,
-     * logging, visualization, etc.  Unique within a single GraphDef.
-     * Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name given to this operator. Used for naming inputs,
-     * logging, visualization, etc.  Unique within a single GraphDef.
-     * Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
-     * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object op_ = ""; - /** - * optional string op = 2; - * - *
-     * The operation name.  There may be custom parameters in attrs.
-     * Op names starting with an underscore are reserved for internal use.
-     * 
- */ - public java.lang.String getOp() { - java.lang.Object ref = op_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - op_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string op = 2; - * - *
-     * The operation name.  There may be custom parameters in attrs.
-     * Op names starting with an underscore are reserved for internal use.
-     * 
- */ - public com.google.protobuf.ByteString - getOpBytes() { - java.lang.Object ref = op_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - op_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string op = 2; - * - *
-     * The operation name.  There may be custom parameters in attrs.
-     * Op names starting with an underscore are reserved for internal use.
-     * 
- */ - public Builder setOp( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - op_ = value; - onChanged(); - return this; - } - /** - * optional string op = 2; - * - *
-     * The operation name.  There may be custom parameters in attrs.
-     * Op names starting with an underscore are reserved for internal use.
-     * 
- */ - public Builder clearOp() { - - op_ = getDefaultInstance().getOp(); - onChanged(); - return this; - } - /** - * optional string op = 2; - * - *
-     * The operation name.  There may be custom parameters in attrs.
-     * Op names starting with an underscore are reserved for internal use.
-     * 
- */ - public Builder setOpBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - op_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList input_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureInputIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - input_ = new com.google.protobuf.LazyStringArrayList(input_); - bitField0_ |= 0x00000004; - } - } - /** - * repeated string input = 3; - * - *
-     * Each input is "node:src_output" with "node" being a string name and
-     * "src_output" indicating which output tensor to use from "node". If
-     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-     * may optionally be followed by control inputs that have the format
-     * "^node".
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getInputList() { - return input_.getUnmodifiableView(); - } - /** - * repeated string input = 3; - * - *
-     * Each input is "node:src_output" with "node" being a string name and
-     * "src_output" indicating which output tensor to use from "node". If
-     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-     * may optionally be followed by control inputs that have the format
-     * "^node".
-     * 
- */ - public int getInputCount() { - return input_.size(); - } - /** - * repeated string input = 3; - * - *
-     * Each input is "node:src_output" with "node" being a string name and
-     * "src_output" indicating which output tensor to use from "node". If
-     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-     * may optionally be followed by control inputs that have the format
-     * "^node".
-     * 
- */ - public java.lang.String getInput(int index) { - return input_.get(index); - } - /** - * repeated string input = 3; - * - *
-     * Each input is "node:src_output" with "node" being a string name and
-     * "src_output" indicating which output tensor to use from "node". If
-     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-     * may optionally be followed by control inputs that have the format
-     * "^node".
-     * 
- */ - public com.google.protobuf.ByteString - getInputBytes(int index) { - return input_.getByteString(index); - } - /** - * repeated string input = 3; - * - *
-     * Each input is "node:src_output" with "node" being a string name and
-     * "src_output" indicating which output tensor to use from "node". If
-     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-     * may optionally be followed by control inputs that have the format
-     * "^node".
-     * 
- */ - public Builder setInput( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputIsMutable(); - input_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string input = 3; - * - *
-     * Each input is "node:src_output" with "node" being a string name and
-     * "src_output" indicating which output tensor to use from "node". If
-     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-     * may optionally be followed by control inputs that have the format
-     * "^node".
-     * 
- */ - public Builder addInput( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputIsMutable(); - input_.add(value); - onChanged(); - return this; - } - /** - * repeated string input = 3; - * - *
-     * Each input is "node:src_output" with "node" being a string name and
-     * "src_output" indicating which output tensor to use from "node". If
-     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-     * may optionally be followed by control inputs that have the format
-     * "^node".
-     * 
- */ - public Builder addAllInput( - java.lang.Iterable values) { - ensureInputIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, input_); - onChanged(); - return this; - } - /** - * repeated string input = 3; - * - *
-     * Each input is "node:src_output" with "node" being a string name and
-     * "src_output" indicating which output tensor to use from "node". If
-     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-     * may optionally be followed by control inputs that have the format
-     * "^node".
-     * 
- */ - public Builder clearInput() { - input_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * repeated string input = 3; - * - *
-     * Each input is "node:src_output" with "node" being a string name and
-     * "src_output" indicating which output tensor to use from "node". If
-     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-     * may optionally be followed by control inputs that have the format
-     * "^node".
-     * 
- */ - public Builder addInputBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureInputIsMutable(); - input_.add(value); - onChanged(); - return this; - } - - private java.lang.Object device_ = ""; - /** - * optional string device = 4; - * - *
-     * A (possibly partial) specification for the device on which this
-     * node should be placed.
-     * The expected syntax for this string is as follows:
-     * DEVICE_SPEC ::= COLOCATED_NODE | PARTIAL_SPEC
-     * COLOCATED_NODE ::= "@" NODE_NAME  // See NodeDef.name above.
-     * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
-     * CONSTRAINT ::= ("job:" JOB_NAME)
-     *              | ("replica:" [1-9][0-9]*)
-     *              | ("task:" [1-9][0-9]*)
-     *              | ( ("gpu" | "cpu") ":" ([1-9][0-9]* | "*") )
-     * Valid values for this string include:
-     * * "@other/node"                         (colocate with "other/node")
-     * * "/job:worker/replica:0/task:1/gpu:3"  (full specification)
-     * * "/job:worker/gpu:3"                   (partial specification)
-     * * ""                                    (no specification)
-     * If the constraints do not resolve to a single device (or if this
-     * field is empty or not present), the runtime will attempt to
-     * choose a device automatically.
-     * 
- */ - public java.lang.String getDevice() { - java.lang.Object ref = device_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - device_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string device = 4; - * - *
-     * A (possibly partial) specification for the device on which this
-     * node should be placed.
-     * The expected syntax for this string is as follows:
-     * DEVICE_SPEC ::= COLOCATED_NODE | PARTIAL_SPEC
-     * COLOCATED_NODE ::= "@" NODE_NAME  // See NodeDef.name above.
-     * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
-     * CONSTRAINT ::= ("job:" JOB_NAME)
-     *              | ("replica:" [1-9][0-9]*)
-     *              | ("task:" [1-9][0-9]*)
-     *              | ( ("gpu" | "cpu") ":" ([1-9][0-9]* | "*") )
-     * Valid values for this string include:
-     * * "@other/node"                         (colocate with "other/node")
-     * * "/job:worker/replica:0/task:1/gpu:3"  (full specification)
-     * * "/job:worker/gpu:3"                   (partial specification)
-     * * ""                                    (no specification)
-     * If the constraints do not resolve to a single device (or if this
-     * field is empty or not present), the runtime will attempt to
-     * choose a device automatically.
-     * 
- */ - public com.google.protobuf.ByteString - getDeviceBytes() { - java.lang.Object ref = device_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - device_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string device = 4; - * - *
-     * A (possibly partial) specification for the device on which this
-     * node should be placed.
-     * The expected syntax for this string is as follows:
-     * DEVICE_SPEC ::= COLOCATED_NODE | PARTIAL_SPEC
-     * COLOCATED_NODE ::= "@" NODE_NAME  // See NodeDef.name above.
-     * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
-     * CONSTRAINT ::= ("job:" JOB_NAME)
-     *              | ("replica:" [1-9][0-9]*)
-     *              | ("task:" [1-9][0-9]*)
-     *              | ( ("gpu" | "cpu") ":" ([1-9][0-9]* | "*") )
-     * Valid values for this string include:
-     * * "@other/node"                         (colocate with "other/node")
-     * * "/job:worker/replica:0/task:1/gpu:3"  (full specification)
-     * * "/job:worker/gpu:3"                   (partial specification)
-     * * ""                                    (no specification)
-     * If the constraints do not resolve to a single device (or if this
-     * field is empty or not present), the runtime will attempt to
-     * choose a device automatically.
-     * 
- */ - public Builder setDevice( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - device_ = value; - onChanged(); - return this; - } - /** - * optional string device = 4; - * - *
-     * A (possibly partial) specification for the device on which this
-     * node should be placed.
-     * The expected syntax for this string is as follows:
-     * DEVICE_SPEC ::= COLOCATED_NODE | PARTIAL_SPEC
-     * COLOCATED_NODE ::= "@" NODE_NAME  // See NodeDef.name above.
-     * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
-     * CONSTRAINT ::= ("job:" JOB_NAME)
-     *              | ("replica:" [1-9][0-9]*)
-     *              | ("task:" [1-9][0-9]*)
-     *              | ( ("gpu" | "cpu") ":" ([1-9][0-9]* | "*") )
-     * Valid values for this string include:
-     * * "@other/node"                         (colocate with "other/node")
-     * * "/job:worker/replica:0/task:1/gpu:3"  (full specification)
-     * * "/job:worker/gpu:3"                   (partial specification)
-     * * ""                                    (no specification)
-     * If the constraints do not resolve to a single device (or if this
-     * field is empty or not present), the runtime will attempt to
-     * choose a device automatically.
-     * 
- */ - public Builder clearDevice() { - - device_ = getDefaultInstance().getDevice(); - onChanged(); - return this; - } - /** - * optional string device = 4; - * - *
-     * A (possibly partial) specification for the device on which this
-     * node should be placed.
-     * The expected syntax for this string is as follows:
-     * DEVICE_SPEC ::= COLOCATED_NODE | PARTIAL_SPEC
-     * COLOCATED_NODE ::= "@" NODE_NAME  // See NodeDef.name above.
-     * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
-     * CONSTRAINT ::= ("job:" JOB_NAME)
-     *              | ("replica:" [1-9][0-9]*)
-     *              | ("task:" [1-9][0-9]*)
-     *              | ( ("gpu" | "cpu") ":" ([1-9][0-9]* | "*") )
-     * Valid values for this string include:
-     * * "@other/node"                         (colocate with "other/node")
-     * * "/job:worker/replica:0/task:1/gpu:3"  (full specification)
-     * * "/job:worker/gpu:3"                   (partial specification)
-     * * ""                                    (no specification)
-     * If the constraints do not resolve to a single device (or if this
-     * field is empty or not present), the runtime will attempt to
-     * choose a device automatically.
-     * 
- */ - public Builder setDeviceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - device_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, org.tensorflow.framework.AttrValue> attr_; - private com.google.protobuf.MapField - internalGetAttr() { - if (attr_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttrDefaultEntryHolder.defaultEntry); - } - return attr_; - } - private com.google.protobuf.MapField - internalGetMutableAttr() { - onChanged();; - if (attr_ == null) { - attr_ = com.google.protobuf.MapField.newMapField( - AttrDefaultEntryHolder.defaultEntry); - } - if (!attr_.isMutable()) { - attr_ = attr_.copy(); - } - return attr_; - } - /** - * map<string, .tensorflow.AttrValue> attr = 5; - * - *
-     * Operation-specific graph-construction-time configuration.
-     * Note that this should include all attrs defined in the
-     * corresponding OpDef, including those with a value matching
-     * the default -- this allows the default to change and makes
-     * NodeDefs easier to interpret on their own.  However, if
-     * an attr with a default is not specified in this list, the
-     * default will be used.
-     * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
-     * one of the names from the corresponding OpDef's attr field).
-     * The values must have a type matching the corresponding OpDef
-     * attr's type field.
-     * TODO(josh11b): Add some examples here showing best practices.
-     * 
- */ - public java.util.Map getAttr() { - return internalGetAttr().getMap(); - } - /** - * map<string, .tensorflow.AttrValue> attr = 5; - * - *
-     * Operation-specific graph-construction-time configuration.
-     * Note that this should include all attrs defined in the
-     * corresponding OpDef, including those with a value matching
-     * the default -- this allows the default to change and makes
-     * NodeDefs easier to interpret on their own.  However, if
-     * an attr with a default is not specified in this list, the
-     * default will be used.
-     * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
-     * one of the names from the corresponding OpDef's attr field).
-     * The values must have a type matching the corresponding OpDef
-     * attr's type field.
-     * TODO(josh11b): Add some examples here showing best practices.
-     * 
- */ - public java.util.Map - getMutableAttr() { - return internalGetMutableAttr().getMutableMap(); - } - /** - * map<string, .tensorflow.AttrValue> attr = 5; - * - *
-     * Operation-specific graph-construction-time configuration.
-     * Note that this should include all attrs defined in the
-     * corresponding OpDef, including those with a value matching
-     * the default -- this allows the default to change and makes
-     * NodeDefs easier to interpret on their own.  However, if
-     * an attr with a default is not specified in this list, the
-     * default will be used.
-     * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
-     * one of the names from the corresponding OpDef's attr field).
-     * The values must have a type matching the corresponding OpDef
-     * attr's type field.
-     * TODO(josh11b): Add some examples here showing best practices.
-     * 
- */ - public Builder putAllAttr( - java.util.Map values) { - getMutableAttr().putAll(values); - 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.NodeDef) - } - - // @@protoc_insertion_point(class_scope:tensorflow.NodeDef) - private static final org.tensorflow.framework.NodeDef DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.NodeDef(); - } - - public static org.tensorflow.framework.NodeDef getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public NodeDef parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new NodeDef(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.NodeDef getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/NodeDefOrBuilder.java b/src/main/java/org/tensorflow/framework/NodeDefOrBuilder.java deleted file mode 100644 index c951dad..0000000 --- a/src/main/java/org/tensorflow/framework/NodeDefOrBuilder.java +++ /dev/null @@ -1,175 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/graph.proto - -package org.tensorflow.framework; - -public interface NodeDefOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.NodeDef) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-   * The name given to this operator. Used for naming inputs,
-   * logging, visualization, etc.  Unique within a single GraphDef.
-   * Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * The name given to this operator. Used for naming inputs,
-   * logging, visualization, etc.  Unique within a single GraphDef.
-   * Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional string op = 2; - * - *
-   * The operation name.  There may be custom parameters in attrs.
-   * Op names starting with an underscore are reserved for internal use.
-   * 
- */ - java.lang.String getOp(); - /** - * optional string op = 2; - * - *
-   * The operation name.  There may be custom parameters in attrs.
-   * Op names starting with an underscore are reserved for internal use.
-   * 
- */ - com.google.protobuf.ByteString - getOpBytes(); - - /** - * repeated string input = 3; - * - *
-   * Each input is "node:src_output" with "node" being a string name and
-   * "src_output" indicating which output tensor to use from "node". If
-   * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-   * may optionally be followed by control inputs that have the format
-   * "^node".
-   * 
- */ - com.google.protobuf.ProtocolStringList - getInputList(); - /** - * repeated string input = 3; - * - *
-   * Each input is "node:src_output" with "node" being a string name and
-   * "src_output" indicating which output tensor to use from "node". If
-   * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-   * may optionally be followed by control inputs that have the format
-   * "^node".
-   * 
- */ - int getInputCount(); - /** - * repeated string input = 3; - * - *
-   * Each input is "node:src_output" with "node" being a string name and
-   * "src_output" indicating which output tensor to use from "node". If
-   * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-   * may optionally be followed by control inputs that have the format
-   * "^node".
-   * 
- */ - java.lang.String getInput(int index); - /** - * repeated string input = 3; - * - *
-   * Each input is "node:src_output" with "node" being a string name and
-   * "src_output" indicating which output tensor to use from "node". If
-   * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
-   * may optionally be followed by control inputs that have the format
-   * "^node".
-   * 
- */ - com.google.protobuf.ByteString - getInputBytes(int index); - - /** - * optional string device = 4; - * - *
-   * A (possibly partial) specification for the device on which this
-   * node should be placed.
-   * The expected syntax for this string is as follows:
-   * DEVICE_SPEC ::= COLOCATED_NODE | PARTIAL_SPEC
-   * COLOCATED_NODE ::= "@" NODE_NAME  // See NodeDef.name above.
-   * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
-   * CONSTRAINT ::= ("job:" JOB_NAME)
-   *              | ("replica:" [1-9][0-9]*)
-   *              | ("task:" [1-9][0-9]*)
-   *              | ( ("gpu" | "cpu") ":" ([1-9][0-9]* | "*") )
-   * Valid values for this string include:
-   * * "@other/node"                         (colocate with "other/node")
-   * * "/job:worker/replica:0/task:1/gpu:3"  (full specification)
-   * * "/job:worker/gpu:3"                   (partial specification)
-   * * ""                                    (no specification)
-   * If the constraints do not resolve to a single device (or if this
-   * field is empty or not present), the runtime will attempt to
-   * choose a device automatically.
-   * 
- */ - java.lang.String getDevice(); - /** - * optional string device = 4; - * - *
-   * A (possibly partial) specification for the device on which this
-   * node should be placed.
-   * The expected syntax for this string is as follows:
-   * DEVICE_SPEC ::= COLOCATED_NODE | PARTIAL_SPEC
-   * COLOCATED_NODE ::= "@" NODE_NAME  // See NodeDef.name above.
-   * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
-   * CONSTRAINT ::= ("job:" JOB_NAME)
-   *              | ("replica:" [1-9][0-9]*)
-   *              | ("task:" [1-9][0-9]*)
-   *              | ( ("gpu" | "cpu") ":" ([1-9][0-9]* | "*") )
-   * Valid values for this string include:
-   * * "@other/node"                         (colocate with "other/node")
-   * * "/job:worker/replica:0/task:1/gpu:3"  (full specification)
-   * * "/job:worker/gpu:3"                   (partial specification)
-   * * ""                                    (no specification)
-   * If the constraints do not resolve to a single device (or if this
-   * field is empty or not present), the runtime will attempt to
-   * choose a device automatically.
-   * 
- */ - com.google.protobuf.ByteString - getDeviceBytes(); - - /** - * map<string, .tensorflow.AttrValue> attr = 5; - * - *
-   * Operation-specific graph-construction-time configuration.
-   * Note that this should include all attrs defined in the
-   * corresponding OpDef, including those with a value matching
-   * the default -- this allows the default to change and makes
-   * NodeDefs easier to interpret on their own.  However, if
-   * an attr with a default is not specified in this list, the
-   * default will be used.
-   * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
-   * one of the names from the corresponding OpDef's attr field).
-   * The values must have a type matching the corresponding OpDef
-   * attr's type field.
-   * TODO(josh11b): Add some examples here showing best practices.
-   * 
- */ - java.util.Map - getAttr(); -} diff --git a/src/main/java/org/tensorflow/framework/NodeExecStats.java b/src/main/java/org/tensorflow/framework/NodeExecStats.java deleted file mode 100644 index aedfd9c..0000000 --- a/src/main/java/org/tensorflow/framework/NodeExecStats.java +++ /dev/null @@ -1,1957 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/step_stats.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.NodeExecStats} - * - *
- * Time/size stats recorded for a single execution of a graph node.
- * 
- */ -public final class NodeExecStats extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.NodeExecStats) - NodeExecStatsOrBuilder { - // Use NodeExecStats.newBuilder() to construct. - private NodeExecStats(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private NodeExecStats() { - nodeName_ = ""; - allStartMicros_ = 0L; - opStartRelMicros_ = 0L; - opEndRelMicros_ = 0L; - allEndRelMicros_ = 0L; - memory_ = java.util.Collections.emptyList(); - output_ = java.util.Collections.emptyList(); - timelineLabel_ = ""; - scheduledMicros_ = 0L; - threadId_ = 0; - referencedTensor_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private NodeExecStats( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - String s = input.readStringRequireUtf8(); - - nodeName_ = s; - break; - } - case 16: { - - allStartMicros_ = input.readInt64(); - break; - } - case 24: { - - opStartRelMicros_ = input.readInt64(); - break; - } - case 32: { - - opEndRelMicros_ = input.readInt64(); - break; - } - case 40: { - - allEndRelMicros_ = input.readInt64(); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - memory_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - memory_.add(input.readMessage(org.tensorflow.framework.AllocatorMemoryUsed.parser(), extensionRegistry)); - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - output_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - output_.add(input.readMessage(org.tensorflow.framework.NodeOutput.parser(), extensionRegistry)); - break; - } - case 66: { - String s = input.readStringRequireUtf8(); - - timelineLabel_ = s; - break; - } - case 72: { - - scheduledMicros_ = input.readInt64(); - break; - } - case 80: { - - threadId_ = input.readUInt32(); - break; - } - case 90: { - if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) { - referencedTensor_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000400; - } - referencedTensor_.add(input.readMessage(org.tensorflow.framework.AllocationDescription.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - memory_ = java.util.Collections.unmodifiableList(memory_); - } - if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - output_ = java.util.Collections.unmodifiableList(output_); - } - if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) { - referencedTensor_ = java.util.Collections.unmodifiableList(referencedTensor_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_NodeExecStats_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_NodeExecStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.NodeExecStats.class, org.tensorflow.framework.NodeExecStats.Builder.class); - } - - private int bitField0_; - public static final int NODE_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object nodeName_; - /** - * optional string node_name = 1; - * - *
-   * TODO(tucker): Use some more compact form of node identity than
-   * the full string name.  Either all processes should agree on a
-   * global id (cost_id?) for each node, or we should use a hash of
-   * the name.
-   * 
- */ - public java.lang.String getNodeName() { - java.lang.Object ref = nodeName_; - 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(); - nodeName_ = s; - return s; - } - } - /** - * optional string node_name = 1; - * - *
-   * TODO(tucker): Use some more compact form of node identity than
-   * the full string name.  Either all processes should agree on a
-   * global id (cost_id?) for each node, or we should use a hash of
-   * the name.
-   * 
- */ - public com.google.protobuf.ByteString - getNodeNameBytes() { - java.lang.Object ref = nodeName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nodeName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ALL_START_MICROS_FIELD_NUMBER = 2; - private long allStartMicros_; - /** - * optional int64 all_start_micros = 2; - */ - public long getAllStartMicros() { - return allStartMicros_; - } - - public static final int OP_START_REL_MICROS_FIELD_NUMBER = 3; - private long opStartRelMicros_; - /** - * optional int64 op_start_rel_micros = 3; - */ - public long getOpStartRelMicros() { - return opStartRelMicros_; - } - - public static final int OP_END_REL_MICROS_FIELD_NUMBER = 4; - private long opEndRelMicros_; - /** - * optional int64 op_end_rel_micros = 4; - */ - public long getOpEndRelMicros() { - return opEndRelMicros_; - } - - public static final int ALL_END_REL_MICROS_FIELD_NUMBER = 5; - private long allEndRelMicros_; - /** - * optional int64 all_end_rel_micros = 5; - */ - public long getAllEndRelMicros() { - return allEndRelMicros_; - } - - public static final int MEMORY_FIELD_NUMBER = 6; - private java.util.List memory_; - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public java.util.List getMemoryList() { - return memory_; - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public java.util.List - getMemoryOrBuilderList() { - return memory_; - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public int getMemoryCount() { - return memory_.size(); - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public org.tensorflow.framework.AllocatorMemoryUsed getMemory(int index) { - return memory_.get(index); - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public org.tensorflow.framework.AllocatorMemoryUsedOrBuilder getMemoryOrBuilder( - int index) { - return memory_.get(index); - } - - public static final int OUTPUT_FIELD_NUMBER = 7; - private java.util.List output_; - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public java.util.List getOutputList() { - return output_; - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public java.util.List - getOutputOrBuilderList() { - return output_; - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public int getOutputCount() { - return output_.size(); - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public org.tensorflow.framework.NodeOutput getOutput(int index) { - return output_.get(index); - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public org.tensorflow.framework.NodeOutputOrBuilder getOutputOrBuilder( - int index) { - return output_.get(index); - } - - public static final int TIMELINE_LABEL_FIELD_NUMBER = 8; - private volatile java.lang.Object timelineLabel_; - /** - * optional string timeline_label = 8; - */ - public java.lang.String getTimelineLabel() { - java.lang.Object ref = timelineLabel_; - 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(); - timelineLabel_ = s; - return s; - } - } - /** - * optional string timeline_label = 8; - */ - public com.google.protobuf.ByteString - getTimelineLabelBytes() { - java.lang.Object ref = timelineLabel_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - timelineLabel_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCHEDULED_MICROS_FIELD_NUMBER = 9; - private long scheduledMicros_; - /** - * optional int64 scheduled_micros = 9; - */ - public long getScheduledMicros() { - return scheduledMicros_; - } - - public static final int THREAD_ID_FIELD_NUMBER = 10; - private int threadId_; - /** - * optional uint32 thread_id = 10; - */ - public int getThreadId() { - return threadId_; - } - - public static final int REFERENCED_TENSOR_FIELD_NUMBER = 11; - private java.util.List referencedTensor_; - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public java.util.List getReferencedTensorList() { - return referencedTensor_; - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public java.util.List - getReferencedTensorOrBuilderList() { - return referencedTensor_; - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public int getReferencedTensorCount() { - return referencedTensor_.size(); - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public org.tensorflow.framework.AllocationDescription getReferencedTensor(int index) { - return referencedTensor_.get(index); - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public org.tensorflow.framework.AllocationDescriptionOrBuilder getReferencedTensorOrBuilder( - int index) { - return referencedTensor_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getNodeNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, nodeName_); - } - if (allStartMicros_ != 0L) { - output.writeInt64(2, allStartMicros_); - } - if (opStartRelMicros_ != 0L) { - output.writeInt64(3, opStartRelMicros_); - } - if (opEndRelMicros_ != 0L) { - output.writeInt64(4, opEndRelMicros_); - } - if (allEndRelMicros_ != 0L) { - output.writeInt64(5, allEndRelMicros_); - } - for (int i = 0; i < memory_.size(); i++) { - output.writeMessage(6, memory_.get(i)); - } - for (int i = 0; i < output_.size(); i++) { - output.writeMessage(7, output_.get(i)); - } - if (!getTimelineLabelBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 8, timelineLabel_); - } - if (scheduledMicros_ != 0L) { - output.writeInt64(9, scheduledMicros_); - } - if (threadId_ != 0) { - output.writeUInt32(10, threadId_); - } - for (int i = 0; i < referencedTensor_.size(); i++) { - output.writeMessage(11, referencedTensor_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNodeNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, nodeName_); - } - if (allStartMicros_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, allStartMicros_); - } - if (opStartRelMicros_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, opStartRelMicros_); - } - if (opEndRelMicros_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, opEndRelMicros_); - } - if (allEndRelMicros_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, allEndRelMicros_); - } - for (int i = 0; i < memory_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, memory_.get(i)); - } - for (int i = 0; i < output_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, output_.get(i)); - } - if (!getTimelineLabelBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(8, timelineLabel_); - } - if (scheduledMicros_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(9, scheduledMicros_); - } - if (threadId_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(10, threadId_); - } - for (int i = 0; i < referencedTensor_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, referencedTensor_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.NodeExecStats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.NodeExecStats 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.NodeExecStats parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.NodeExecStats parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.NodeExecStats parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.NodeExecStats parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.NodeExecStats parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.NodeExecStats parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.NodeExecStats parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.NodeExecStats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.NodeExecStats 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.NodeExecStats} - * - *
-   * Time/size stats recorded for a single execution of a graph node.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.NodeExecStats) - org.tensorflow.framework.NodeExecStatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_NodeExecStats_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_NodeExecStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.NodeExecStats.class, org.tensorflow.framework.NodeExecStats.Builder.class); - } - - // Construct using org.tensorflow.framework.NodeExecStats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getMemoryFieldBuilder(); - getOutputFieldBuilder(); - getReferencedTensorFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - nodeName_ = ""; - - allStartMicros_ = 0L; - - opStartRelMicros_ = 0L; - - opEndRelMicros_ = 0L; - - allEndRelMicros_ = 0L; - - if (memoryBuilder_ == null) { - memory_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - memoryBuilder_.clear(); - } - if (outputBuilder_ == null) { - output_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - } else { - outputBuilder_.clear(); - } - timelineLabel_ = ""; - - scheduledMicros_ = 0L; - - threadId_ = 0; - - if (referencedTensorBuilder_ == null) { - referencedTensor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); - } else { - referencedTensorBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_NodeExecStats_descriptor; - } - - public org.tensorflow.framework.NodeExecStats getDefaultInstanceForType() { - return org.tensorflow.framework.NodeExecStats.getDefaultInstance(); - } - - public org.tensorflow.framework.NodeExecStats build() { - org.tensorflow.framework.NodeExecStats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.NodeExecStats buildPartial() { - org.tensorflow.framework.NodeExecStats result = new org.tensorflow.framework.NodeExecStats(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.nodeName_ = nodeName_; - result.allStartMicros_ = allStartMicros_; - result.opStartRelMicros_ = opStartRelMicros_; - result.opEndRelMicros_ = opEndRelMicros_; - result.allEndRelMicros_ = allEndRelMicros_; - if (memoryBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { - memory_ = java.util.Collections.unmodifiableList(memory_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.memory_ = memory_; - } else { - result.memory_ = memoryBuilder_.build(); - } - if (outputBuilder_ == null) { - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output_ = java.util.Collections.unmodifiableList(output_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.output_ = output_; - } else { - result.output_ = outputBuilder_.build(); - } - result.timelineLabel_ = timelineLabel_; - result.scheduledMicros_ = scheduledMicros_; - result.threadId_ = threadId_; - if (referencedTensorBuilder_ == null) { - if (((bitField0_ & 0x00000400) == 0x00000400)) { - referencedTensor_ = java.util.Collections.unmodifiableList(referencedTensor_); - bitField0_ = (bitField0_ & ~0x00000400); - } - result.referencedTensor_ = referencedTensor_; - } else { - result.referencedTensor_ = referencedTensorBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.NodeExecStats) { - return mergeFrom((org.tensorflow.framework.NodeExecStats)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.NodeExecStats other) { - if (other == org.tensorflow.framework.NodeExecStats.getDefaultInstance()) return this; - if (!other.getNodeName().isEmpty()) { - nodeName_ = other.nodeName_; - onChanged(); - } - if (other.getAllStartMicros() != 0L) { - setAllStartMicros(other.getAllStartMicros()); - } - if (other.getOpStartRelMicros() != 0L) { - setOpStartRelMicros(other.getOpStartRelMicros()); - } - if (other.getOpEndRelMicros() != 0L) { - setOpEndRelMicros(other.getOpEndRelMicros()); - } - if (other.getAllEndRelMicros() != 0L) { - setAllEndRelMicros(other.getAllEndRelMicros()); - } - if (memoryBuilder_ == null) { - if (!other.memory_.isEmpty()) { - if (memory_.isEmpty()) { - memory_ = other.memory_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureMemoryIsMutable(); - memory_.addAll(other.memory_); - } - onChanged(); - } - } else { - if (!other.memory_.isEmpty()) { - if (memoryBuilder_.isEmpty()) { - memoryBuilder_.dispose(); - memoryBuilder_ = null; - memory_ = other.memory_; - bitField0_ = (bitField0_ & ~0x00000020); - memoryBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getMemoryFieldBuilder() : null; - } else { - memoryBuilder_.addAllMessages(other.memory_); - } - } - } - if (outputBuilder_ == null) { - if (!other.output_.isEmpty()) { - if (output_.isEmpty()) { - output_ = other.output_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureOutputIsMutable(); - output_.addAll(other.output_); - } - onChanged(); - } - } else { - if (!other.output_.isEmpty()) { - if (outputBuilder_.isEmpty()) { - outputBuilder_.dispose(); - outputBuilder_ = null; - output_ = other.output_; - bitField0_ = (bitField0_ & ~0x00000040); - outputBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getOutputFieldBuilder() : null; - } else { - outputBuilder_.addAllMessages(other.output_); - } - } - } - if (!other.getTimelineLabel().isEmpty()) { - timelineLabel_ = other.timelineLabel_; - onChanged(); - } - if (other.getScheduledMicros() != 0L) { - setScheduledMicros(other.getScheduledMicros()); - } - if (other.getThreadId() != 0) { - setThreadId(other.getThreadId()); - } - if (referencedTensorBuilder_ == null) { - if (!other.referencedTensor_.isEmpty()) { - if (referencedTensor_.isEmpty()) { - referencedTensor_ = other.referencedTensor_; - bitField0_ = (bitField0_ & ~0x00000400); - } else { - ensureReferencedTensorIsMutable(); - referencedTensor_.addAll(other.referencedTensor_); - } - onChanged(); - } - } else { - if (!other.referencedTensor_.isEmpty()) { - if (referencedTensorBuilder_.isEmpty()) { - referencedTensorBuilder_.dispose(); - referencedTensorBuilder_ = null; - referencedTensor_ = other.referencedTensor_; - bitField0_ = (bitField0_ & ~0x00000400); - referencedTensorBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getReferencedTensorFieldBuilder() : null; - } else { - referencedTensorBuilder_.addAllMessages(other.referencedTensor_); - } - } - } - 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.NodeExecStats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.NodeExecStats) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object nodeName_ = ""; - /** - * optional string node_name = 1; - * - *
-     * TODO(tucker): Use some more compact form of node identity than
-     * the full string name.  Either all processes should agree on a
-     * global id (cost_id?) for each node, or we should use a hash of
-     * the name.
-     * 
- */ - public java.lang.String getNodeName() { - java.lang.Object ref = nodeName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nodeName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string node_name = 1; - * - *
-     * TODO(tucker): Use some more compact form of node identity than
-     * the full string name.  Either all processes should agree on a
-     * global id (cost_id?) for each node, or we should use a hash of
-     * the name.
-     * 
- */ - public com.google.protobuf.ByteString - getNodeNameBytes() { - java.lang.Object ref = nodeName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nodeName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string node_name = 1; - * - *
-     * TODO(tucker): Use some more compact form of node identity than
-     * the full string name.  Either all processes should agree on a
-     * global id (cost_id?) for each node, or we should use a hash of
-     * the name.
-     * 
- */ - public Builder setNodeName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nodeName_ = value; - onChanged(); - return this; - } - /** - * optional string node_name = 1; - * - *
-     * TODO(tucker): Use some more compact form of node identity than
-     * the full string name.  Either all processes should agree on a
-     * global id (cost_id?) for each node, or we should use a hash of
-     * the name.
-     * 
- */ - public Builder clearNodeName() { - - nodeName_ = getDefaultInstance().getNodeName(); - onChanged(); - return this; - } - /** - * optional string node_name = 1; - * - *
-     * TODO(tucker): Use some more compact form of node identity than
-     * the full string name.  Either all processes should agree on a
-     * global id (cost_id?) for each node, or we should use a hash of
-     * the name.
-     * 
- */ - public Builder setNodeNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nodeName_ = value; - onChanged(); - return this; - } - - private long allStartMicros_ ; - /** - * optional int64 all_start_micros = 2; - */ - public long getAllStartMicros() { - return allStartMicros_; - } - /** - * optional int64 all_start_micros = 2; - */ - public Builder setAllStartMicros(long value) { - - allStartMicros_ = value; - onChanged(); - return this; - } - /** - * optional int64 all_start_micros = 2; - */ - public Builder clearAllStartMicros() { - - allStartMicros_ = 0L; - onChanged(); - return this; - } - - private long opStartRelMicros_ ; - /** - * optional int64 op_start_rel_micros = 3; - */ - public long getOpStartRelMicros() { - return opStartRelMicros_; - } - /** - * optional int64 op_start_rel_micros = 3; - */ - public Builder setOpStartRelMicros(long value) { - - opStartRelMicros_ = value; - onChanged(); - return this; - } - /** - * optional int64 op_start_rel_micros = 3; - */ - public Builder clearOpStartRelMicros() { - - opStartRelMicros_ = 0L; - onChanged(); - return this; - } - - private long opEndRelMicros_ ; - /** - * optional int64 op_end_rel_micros = 4; - */ - public long getOpEndRelMicros() { - return opEndRelMicros_; - } - /** - * optional int64 op_end_rel_micros = 4; - */ - public Builder setOpEndRelMicros(long value) { - - opEndRelMicros_ = value; - onChanged(); - return this; - } - /** - * optional int64 op_end_rel_micros = 4; - */ - public Builder clearOpEndRelMicros() { - - opEndRelMicros_ = 0L; - onChanged(); - return this; - } - - private long allEndRelMicros_ ; - /** - * optional int64 all_end_rel_micros = 5; - */ - public long getAllEndRelMicros() { - return allEndRelMicros_; - } - /** - * optional int64 all_end_rel_micros = 5; - */ - public Builder setAllEndRelMicros(long value) { - - allEndRelMicros_ = value; - onChanged(); - return this; - } - /** - * optional int64 all_end_rel_micros = 5; - */ - public Builder clearAllEndRelMicros() { - - allEndRelMicros_ = 0L; - onChanged(); - return this; - } - - private java.util.List memory_ = - java.util.Collections.emptyList(); - private void ensureMemoryIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - memory_ = new java.util.ArrayList(memory_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.AllocatorMemoryUsed, org.tensorflow.framework.AllocatorMemoryUsed.Builder, org.tensorflow.framework.AllocatorMemoryUsedOrBuilder> memoryBuilder_; - - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public java.util.List getMemoryList() { - if (memoryBuilder_ == null) { - return java.util.Collections.unmodifiableList(memory_); - } else { - return memoryBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public int getMemoryCount() { - if (memoryBuilder_ == null) { - return memory_.size(); - } else { - return memoryBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public org.tensorflow.framework.AllocatorMemoryUsed getMemory(int index) { - if (memoryBuilder_ == null) { - return memory_.get(index); - } else { - return memoryBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public Builder setMemory( - int index, org.tensorflow.framework.AllocatorMemoryUsed value) { - if (memoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMemoryIsMutable(); - memory_.set(index, value); - onChanged(); - } else { - memoryBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public Builder setMemory( - int index, org.tensorflow.framework.AllocatorMemoryUsed.Builder builderForValue) { - if (memoryBuilder_ == null) { - ensureMemoryIsMutable(); - memory_.set(index, builderForValue.build()); - onChanged(); - } else { - memoryBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public Builder addMemory(org.tensorflow.framework.AllocatorMemoryUsed value) { - if (memoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMemoryIsMutable(); - memory_.add(value); - onChanged(); - } else { - memoryBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public Builder addMemory( - int index, org.tensorflow.framework.AllocatorMemoryUsed value) { - if (memoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMemoryIsMutable(); - memory_.add(index, value); - onChanged(); - } else { - memoryBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public Builder addMemory( - org.tensorflow.framework.AllocatorMemoryUsed.Builder builderForValue) { - if (memoryBuilder_ == null) { - ensureMemoryIsMutable(); - memory_.add(builderForValue.build()); - onChanged(); - } else { - memoryBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public Builder addMemory( - int index, org.tensorflow.framework.AllocatorMemoryUsed.Builder builderForValue) { - if (memoryBuilder_ == null) { - ensureMemoryIsMutable(); - memory_.add(index, builderForValue.build()); - onChanged(); - } else { - memoryBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public Builder addAllMemory( - java.lang.Iterable values) { - if (memoryBuilder_ == null) { - ensureMemoryIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, memory_); - onChanged(); - } else { - memoryBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public Builder clearMemory() { - if (memoryBuilder_ == null) { - memory_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - memoryBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public Builder removeMemory(int index) { - if (memoryBuilder_ == null) { - ensureMemoryIsMutable(); - memory_.remove(index); - onChanged(); - } else { - memoryBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public org.tensorflow.framework.AllocatorMemoryUsed.Builder getMemoryBuilder( - int index) { - return getMemoryFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public org.tensorflow.framework.AllocatorMemoryUsedOrBuilder getMemoryOrBuilder( - int index) { - if (memoryBuilder_ == null) { - return memory_.get(index); } else { - return memoryBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public java.util.List - getMemoryOrBuilderList() { - if (memoryBuilder_ != null) { - return memoryBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(memory_); - } - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public org.tensorflow.framework.AllocatorMemoryUsed.Builder addMemoryBuilder() { - return getMemoryFieldBuilder().addBuilder( - org.tensorflow.framework.AllocatorMemoryUsed.getDefaultInstance()); - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public org.tensorflow.framework.AllocatorMemoryUsed.Builder addMemoryBuilder( - int index) { - return getMemoryFieldBuilder().addBuilder( - index, org.tensorflow.framework.AllocatorMemoryUsed.getDefaultInstance()); - } - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - public java.util.List - getMemoryBuilderList() { - return getMemoryFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.AllocatorMemoryUsed, org.tensorflow.framework.AllocatorMemoryUsed.Builder, org.tensorflow.framework.AllocatorMemoryUsedOrBuilder> - getMemoryFieldBuilder() { - if (memoryBuilder_ == null) { - memoryBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.AllocatorMemoryUsed, org.tensorflow.framework.AllocatorMemoryUsed.Builder, org.tensorflow.framework.AllocatorMemoryUsedOrBuilder>( - memory_, - ((bitField0_ & 0x00000020) == 0x00000020), - getParentForChildren(), - isClean()); - memory_ = null; - } - return memoryBuilder_; - } - - private java.util.List output_ = - java.util.Collections.emptyList(); - private void ensureOutputIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - output_ = new java.util.ArrayList(output_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.NodeOutput, org.tensorflow.framework.NodeOutput.Builder, org.tensorflow.framework.NodeOutputOrBuilder> outputBuilder_; - - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public java.util.List getOutputList() { - if (outputBuilder_ == null) { - return java.util.Collections.unmodifiableList(output_); - } else { - return outputBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public int getOutputCount() { - if (outputBuilder_ == null) { - return output_.size(); - } else { - return outputBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public org.tensorflow.framework.NodeOutput getOutput(int index) { - if (outputBuilder_ == null) { - return output_.get(index); - } else { - return outputBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public Builder setOutput( - int index, org.tensorflow.framework.NodeOutput value) { - if (outputBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputIsMutable(); - output_.set(index, value); - onChanged(); - } else { - outputBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public Builder setOutput( - int index, org.tensorflow.framework.NodeOutput.Builder builderForValue) { - if (outputBuilder_ == null) { - ensureOutputIsMutable(); - output_.set(index, builderForValue.build()); - onChanged(); - } else { - outputBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public Builder addOutput(org.tensorflow.framework.NodeOutput value) { - if (outputBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputIsMutable(); - output_.add(value); - onChanged(); - } else { - outputBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public Builder addOutput( - int index, org.tensorflow.framework.NodeOutput value) { - if (outputBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputIsMutable(); - output_.add(index, value); - onChanged(); - } else { - outputBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public Builder addOutput( - org.tensorflow.framework.NodeOutput.Builder builderForValue) { - if (outputBuilder_ == null) { - ensureOutputIsMutable(); - output_.add(builderForValue.build()); - onChanged(); - } else { - outputBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public Builder addOutput( - int index, org.tensorflow.framework.NodeOutput.Builder builderForValue) { - if (outputBuilder_ == null) { - ensureOutputIsMutable(); - output_.add(index, builderForValue.build()); - onChanged(); - } else { - outputBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public Builder addAllOutput( - java.lang.Iterable values) { - if (outputBuilder_ == null) { - ensureOutputIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, output_); - onChanged(); - } else { - outputBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public Builder clearOutput() { - if (outputBuilder_ == null) { - output_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - outputBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public Builder removeOutput(int index) { - if (outputBuilder_ == null) { - ensureOutputIsMutable(); - output_.remove(index); - onChanged(); - } else { - outputBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public org.tensorflow.framework.NodeOutput.Builder getOutputBuilder( - int index) { - return getOutputFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public org.tensorflow.framework.NodeOutputOrBuilder getOutputOrBuilder( - int index) { - if (outputBuilder_ == null) { - return output_.get(index); } else { - return outputBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public java.util.List - getOutputOrBuilderList() { - if (outputBuilder_ != null) { - return outputBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(output_); - } - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public org.tensorflow.framework.NodeOutput.Builder addOutputBuilder() { - return getOutputFieldBuilder().addBuilder( - org.tensorflow.framework.NodeOutput.getDefaultInstance()); - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public org.tensorflow.framework.NodeOutput.Builder addOutputBuilder( - int index) { - return getOutputFieldBuilder().addBuilder( - index, org.tensorflow.framework.NodeOutput.getDefaultInstance()); - } - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - public java.util.List - getOutputBuilderList() { - return getOutputFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.NodeOutput, org.tensorflow.framework.NodeOutput.Builder, org.tensorflow.framework.NodeOutputOrBuilder> - getOutputFieldBuilder() { - if (outputBuilder_ == null) { - outputBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.NodeOutput, org.tensorflow.framework.NodeOutput.Builder, org.tensorflow.framework.NodeOutputOrBuilder>( - output_, - ((bitField0_ & 0x00000040) == 0x00000040), - getParentForChildren(), - isClean()); - output_ = null; - } - return outputBuilder_; - } - - private java.lang.Object timelineLabel_ = ""; - /** - * optional string timeline_label = 8; - */ - public java.lang.String getTimelineLabel() { - java.lang.Object ref = timelineLabel_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - timelineLabel_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string timeline_label = 8; - */ - public com.google.protobuf.ByteString - getTimelineLabelBytes() { - java.lang.Object ref = timelineLabel_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - timelineLabel_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string timeline_label = 8; - */ - public Builder setTimelineLabel( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - timelineLabel_ = value; - onChanged(); - return this; - } - /** - * optional string timeline_label = 8; - */ - public Builder clearTimelineLabel() { - - timelineLabel_ = getDefaultInstance().getTimelineLabel(); - onChanged(); - return this; - } - /** - * optional string timeline_label = 8; - */ - public Builder setTimelineLabelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - timelineLabel_ = value; - onChanged(); - return this; - } - - private long scheduledMicros_ ; - /** - * optional int64 scheduled_micros = 9; - */ - public long getScheduledMicros() { - return scheduledMicros_; - } - /** - * optional int64 scheduled_micros = 9; - */ - public Builder setScheduledMicros(long value) { - - scheduledMicros_ = value; - onChanged(); - return this; - } - /** - * optional int64 scheduled_micros = 9; - */ - public Builder clearScheduledMicros() { - - scheduledMicros_ = 0L; - onChanged(); - return this; - } - - private int threadId_ ; - /** - * optional uint32 thread_id = 10; - */ - public int getThreadId() { - return threadId_; - } - /** - * optional uint32 thread_id = 10; - */ - public Builder setThreadId(int value) { - - threadId_ = value; - onChanged(); - return this; - } - /** - * optional uint32 thread_id = 10; - */ - public Builder clearThreadId() { - - threadId_ = 0; - onChanged(); - return this; - } - - private java.util.List referencedTensor_ = - java.util.Collections.emptyList(); - private void ensureReferencedTensorIsMutable() { - if (!((bitField0_ & 0x00000400) == 0x00000400)) { - referencedTensor_ = new java.util.ArrayList(referencedTensor_); - bitField0_ |= 0x00000400; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.AllocationDescription, org.tensorflow.framework.AllocationDescription.Builder, org.tensorflow.framework.AllocationDescriptionOrBuilder> referencedTensorBuilder_; - - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public java.util.List getReferencedTensorList() { - if (referencedTensorBuilder_ == null) { - return java.util.Collections.unmodifiableList(referencedTensor_); - } else { - return referencedTensorBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public int getReferencedTensorCount() { - if (referencedTensorBuilder_ == null) { - return referencedTensor_.size(); - } else { - return referencedTensorBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public org.tensorflow.framework.AllocationDescription getReferencedTensor(int index) { - if (referencedTensorBuilder_ == null) { - return referencedTensor_.get(index); - } else { - return referencedTensorBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public Builder setReferencedTensor( - int index, org.tensorflow.framework.AllocationDescription value) { - if (referencedTensorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferencedTensorIsMutable(); - referencedTensor_.set(index, value); - onChanged(); - } else { - referencedTensorBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public Builder setReferencedTensor( - int index, org.tensorflow.framework.AllocationDescription.Builder builderForValue) { - if (referencedTensorBuilder_ == null) { - ensureReferencedTensorIsMutable(); - referencedTensor_.set(index, builderForValue.build()); - onChanged(); - } else { - referencedTensorBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public Builder addReferencedTensor(org.tensorflow.framework.AllocationDescription value) { - if (referencedTensorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferencedTensorIsMutable(); - referencedTensor_.add(value); - onChanged(); - } else { - referencedTensorBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public Builder addReferencedTensor( - int index, org.tensorflow.framework.AllocationDescription value) { - if (referencedTensorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferencedTensorIsMutable(); - referencedTensor_.add(index, value); - onChanged(); - } else { - referencedTensorBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public Builder addReferencedTensor( - org.tensorflow.framework.AllocationDescription.Builder builderForValue) { - if (referencedTensorBuilder_ == null) { - ensureReferencedTensorIsMutable(); - referencedTensor_.add(builderForValue.build()); - onChanged(); - } else { - referencedTensorBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public Builder addReferencedTensor( - int index, org.tensorflow.framework.AllocationDescription.Builder builderForValue) { - if (referencedTensorBuilder_ == null) { - ensureReferencedTensorIsMutable(); - referencedTensor_.add(index, builderForValue.build()); - onChanged(); - } else { - referencedTensorBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public Builder addAllReferencedTensor( - java.lang.Iterable values) { - if (referencedTensorBuilder_ == null) { - ensureReferencedTensorIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, referencedTensor_); - onChanged(); - } else { - referencedTensorBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public Builder clearReferencedTensor() { - if (referencedTensorBuilder_ == null) { - referencedTensor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - } else { - referencedTensorBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public Builder removeReferencedTensor(int index) { - if (referencedTensorBuilder_ == null) { - ensureReferencedTensorIsMutable(); - referencedTensor_.remove(index); - onChanged(); - } else { - referencedTensorBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public org.tensorflow.framework.AllocationDescription.Builder getReferencedTensorBuilder( - int index) { - return getReferencedTensorFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public org.tensorflow.framework.AllocationDescriptionOrBuilder getReferencedTensorOrBuilder( - int index) { - if (referencedTensorBuilder_ == null) { - return referencedTensor_.get(index); } else { - return referencedTensorBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public java.util.List - getReferencedTensorOrBuilderList() { - if (referencedTensorBuilder_ != null) { - return referencedTensorBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(referencedTensor_); - } - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public org.tensorflow.framework.AllocationDescription.Builder addReferencedTensorBuilder() { - return getReferencedTensorFieldBuilder().addBuilder( - org.tensorflow.framework.AllocationDescription.getDefaultInstance()); - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public org.tensorflow.framework.AllocationDescription.Builder addReferencedTensorBuilder( - int index) { - return getReferencedTensorFieldBuilder().addBuilder( - index, org.tensorflow.framework.AllocationDescription.getDefaultInstance()); - } - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - public java.util.List - getReferencedTensorBuilderList() { - return getReferencedTensorFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.AllocationDescription, org.tensorflow.framework.AllocationDescription.Builder, org.tensorflow.framework.AllocationDescriptionOrBuilder> - getReferencedTensorFieldBuilder() { - if (referencedTensorBuilder_ == null) { - referencedTensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.AllocationDescription, org.tensorflow.framework.AllocationDescription.Builder, org.tensorflow.framework.AllocationDescriptionOrBuilder>( - referencedTensor_, - ((bitField0_ & 0x00000400) == 0x00000400), - getParentForChildren(), - isClean()); - referencedTensor_ = null; - } - return referencedTensorBuilder_; - } - 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.NodeExecStats) - } - - // @@protoc_insertion_point(class_scope:tensorflow.NodeExecStats) - private static final org.tensorflow.framework.NodeExecStats DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.NodeExecStats(); - } - - public static org.tensorflow.framework.NodeExecStats getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public NodeExecStats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new NodeExecStats(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.NodeExecStats getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/NodeExecStatsOrBuilder.java b/src/main/java/org/tensorflow/framework/NodeExecStatsOrBuilder.java deleted file mode 100644 index a1fb707..0000000 --- a/src/main/java/org/tensorflow/framework/NodeExecStatsOrBuilder.java +++ /dev/null @@ -1,145 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/step_stats.proto - -package org.tensorflow.framework; - -public interface NodeExecStatsOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.NodeExecStats) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string node_name = 1; - * - *
-   * TODO(tucker): Use some more compact form of node identity than
-   * the full string name.  Either all processes should agree on a
-   * global id (cost_id?) for each node, or we should use a hash of
-   * the name.
-   * 
- */ - java.lang.String getNodeName(); - /** - * optional string node_name = 1; - * - *
-   * TODO(tucker): Use some more compact form of node identity than
-   * the full string name.  Either all processes should agree on a
-   * global id (cost_id?) for each node, or we should use a hash of
-   * the name.
-   * 
- */ - com.google.protobuf.ByteString - getNodeNameBytes(); - - /** - * optional int64 all_start_micros = 2; - */ - long getAllStartMicros(); - - /** - * optional int64 op_start_rel_micros = 3; - */ - long getOpStartRelMicros(); - - /** - * optional int64 op_end_rel_micros = 4; - */ - long getOpEndRelMicros(); - - /** - * optional int64 all_end_rel_micros = 5; - */ - long getAllEndRelMicros(); - - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - java.util.List - getMemoryList(); - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - org.tensorflow.framework.AllocatorMemoryUsed getMemory(int index); - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - int getMemoryCount(); - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - java.util.List - getMemoryOrBuilderList(); - /** - * repeated .tensorflow.AllocatorMemoryUsed memory = 6; - */ - org.tensorflow.framework.AllocatorMemoryUsedOrBuilder getMemoryOrBuilder( - int index); - - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - java.util.List - getOutputList(); - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - org.tensorflow.framework.NodeOutput getOutput(int index); - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - int getOutputCount(); - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - java.util.List - getOutputOrBuilderList(); - /** - * repeated .tensorflow.NodeOutput output = 7; - */ - org.tensorflow.framework.NodeOutputOrBuilder getOutputOrBuilder( - int index); - - /** - * optional string timeline_label = 8; - */ - java.lang.String getTimelineLabel(); - /** - * optional string timeline_label = 8; - */ - com.google.protobuf.ByteString - getTimelineLabelBytes(); - - /** - * optional int64 scheduled_micros = 9; - */ - long getScheduledMicros(); - - /** - * optional uint32 thread_id = 10; - */ - int getThreadId(); - - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - java.util.List - getReferencedTensorList(); - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - org.tensorflow.framework.AllocationDescription getReferencedTensor(int index); - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - int getReferencedTensorCount(); - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - java.util.List - getReferencedTensorOrBuilderList(); - /** - * repeated .tensorflow.AllocationDescription referenced_tensor = 11; - */ - org.tensorflow.framework.AllocationDescriptionOrBuilder getReferencedTensorOrBuilder( - int index); -} diff --git a/src/main/java/org/tensorflow/framework/NodeOutput.java b/src/main/java/org/tensorflow/framework/NodeOutput.java deleted file mode 100644 index 6284957..0000000 --- a/src/main/java/org/tensorflow/framework/NodeOutput.java +++ /dev/null @@ -1,551 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/step_stats.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.NodeOutput} - * - *
- * Output sizes recorded for a single execution of a graph node.
- * 
- */ -public final class NodeOutput extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.NodeOutput) - NodeOutputOrBuilder { - // Use NodeOutput.newBuilder() to construct. - private NodeOutput(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private NodeOutput() { - slot_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private NodeOutput( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 8: { - - slot_ = input.readInt32(); - break; - } - case 26: { - org.tensorflow.framework.TensorDescription.Builder subBuilder = null; - if (tensorDescription_ != null) { - subBuilder = tensorDescription_.toBuilder(); - } - tensorDescription_ = input.readMessage(org.tensorflow.framework.TensorDescription.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tensorDescription_); - tensorDescription_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_NodeOutput_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_NodeOutput_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.NodeOutput.class, org.tensorflow.framework.NodeOutput.Builder.class); - } - - public static final int SLOT_FIELD_NUMBER = 1; - private int slot_; - /** - * optional int32 slot = 1; - */ - public int getSlot() { - return slot_; - } - - public static final int TENSOR_DESCRIPTION_FIELD_NUMBER = 3; - private org.tensorflow.framework.TensorDescription tensorDescription_; - /** - * optional .tensorflow.TensorDescription tensor_description = 3; - */ - public boolean hasTensorDescription() { - return tensorDescription_ != null; - } - /** - * optional .tensorflow.TensorDescription tensor_description = 3; - */ - public org.tensorflow.framework.TensorDescription getTensorDescription() { - return tensorDescription_ == null ? org.tensorflow.framework.TensorDescription.getDefaultInstance() : tensorDescription_; - } - /** - * optional .tensorflow.TensorDescription tensor_description = 3; - */ - public org.tensorflow.framework.TensorDescriptionOrBuilder getTensorDescriptionOrBuilder() { - return getTensorDescription(); - } - - 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 (slot_ != 0) { - output.writeInt32(1, slot_); - } - if (tensorDescription_ != null) { - output.writeMessage(3, getTensorDescription()); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (slot_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, slot_); - } - if (tensorDescription_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getTensorDescription()); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.NodeOutput parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.NodeOutput 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.NodeOutput parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.NodeOutput parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.NodeOutput parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.NodeOutput parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.NodeOutput parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.NodeOutput parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.NodeOutput parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.NodeOutput parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.NodeOutput 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.NodeOutput} - * - *
-   * Output sizes recorded for a single execution of a graph node.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.NodeOutput) - org.tensorflow.framework.NodeOutputOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_NodeOutput_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_NodeOutput_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.NodeOutput.class, org.tensorflow.framework.NodeOutput.Builder.class); - } - - // Construct using org.tensorflow.framework.NodeOutput.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - slot_ = 0; - - if (tensorDescriptionBuilder_ == null) { - tensorDescription_ = null; - } else { - tensorDescription_ = null; - tensorDescriptionBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_NodeOutput_descriptor; - } - - public org.tensorflow.framework.NodeOutput getDefaultInstanceForType() { - return org.tensorflow.framework.NodeOutput.getDefaultInstance(); - } - - public org.tensorflow.framework.NodeOutput build() { - org.tensorflow.framework.NodeOutput result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.NodeOutput buildPartial() { - org.tensorflow.framework.NodeOutput result = new org.tensorflow.framework.NodeOutput(this); - result.slot_ = slot_; - if (tensorDescriptionBuilder_ == null) { - result.tensorDescription_ = tensorDescription_; - } else { - result.tensorDescription_ = tensorDescriptionBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.NodeOutput) { - return mergeFrom((org.tensorflow.framework.NodeOutput)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.NodeOutput other) { - if (other == org.tensorflow.framework.NodeOutput.getDefaultInstance()) return this; - if (other.getSlot() != 0) { - setSlot(other.getSlot()); - } - if (other.hasTensorDescription()) { - mergeTensorDescription(other.getTensorDescription()); - } - 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.NodeOutput parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.NodeOutput) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int slot_ ; - /** - * optional int32 slot = 1; - */ - public int getSlot() { - return slot_; - } - /** - * optional int32 slot = 1; - */ - public Builder setSlot(int value) { - - slot_ = value; - onChanged(); - return this; - } - /** - * optional int32 slot = 1; - */ - public Builder clearSlot() { - - slot_ = 0; - onChanged(); - return this; - } - - private org.tensorflow.framework.TensorDescription tensorDescription_ = null; - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.TensorDescription, org.tensorflow.framework.TensorDescription.Builder, org.tensorflow.framework.TensorDescriptionOrBuilder> tensorDescriptionBuilder_; - /** - * optional .tensorflow.TensorDescription tensor_description = 3; - */ - public boolean hasTensorDescription() { - return tensorDescriptionBuilder_ != null || tensorDescription_ != null; - } - /** - * optional .tensorflow.TensorDescription tensor_description = 3; - */ - public org.tensorflow.framework.TensorDescription getTensorDescription() { - if (tensorDescriptionBuilder_ == null) { - return tensorDescription_ == null ? org.tensorflow.framework.TensorDescription.getDefaultInstance() : tensorDescription_; - } else { - return tensorDescriptionBuilder_.getMessage(); - } - } - /** - * optional .tensorflow.TensorDescription tensor_description = 3; - */ - public Builder setTensorDescription(org.tensorflow.framework.TensorDescription value) { - if (tensorDescriptionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tensorDescription_ = value; - onChanged(); - } else { - tensorDescriptionBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .tensorflow.TensorDescription tensor_description = 3; - */ - public Builder setTensorDescription( - org.tensorflow.framework.TensorDescription.Builder builderForValue) { - if (tensorDescriptionBuilder_ == null) { - tensorDescription_ = builderForValue.build(); - onChanged(); - } else { - tensorDescriptionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .tensorflow.TensorDescription tensor_description = 3; - */ - public Builder mergeTensorDescription(org.tensorflow.framework.TensorDescription value) { - if (tensorDescriptionBuilder_ == null) { - if (tensorDescription_ != null) { - tensorDescription_ = - org.tensorflow.framework.TensorDescription.newBuilder(tensorDescription_).mergeFrom(value).buildPartial(); - } else { - tensorDescription_ = value; - } - onChanged(); - } else { - tensorDescriptionBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .tensorflow.TensorDescription tensor_description = 3; - */ - public Builder clearTensorDescription() { - if (tensorDescriptionBuilder_ == null) { - tensorDescription_ = null; - onChanged(); - } else { - tensorDescription_ = null; - tensorDescriptionBuilder_ = null; - } - - return this; - } - /** - * optional .tensorflow.TensorDescription tensor_description = 3; - */ - public org.tensorflow.framework.TensorDescription.Builder getTensorDescriptionBuilder() { - - onChanged(); - return getTensorDescriptionFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.TensorDescription tensor_description = 3; - */ - public org.tensorflow.framework.TensorDescriptionOrBuilder getTensorDescriptionOrBuilder() { - if (tensorDescriptionBuilder_ != null) { - return tensorDescriptionBuilder_.getMessageOrBuilder(); - } else { - return tensorDescription_ == null ? - org.tensorflow.framework.TensorDescription.getDefaultInstance() : tensorDescription_; - } - } - /** - * optional .tensorflow.TensorDescription tensor_description = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.TensorDescription, org.tensorflow.framework.TensorDescription.Builder, org.tensorflow.framework.TensorDescriptionOrBuilder> - getTensorDescriptionFieldBuilder() { - if (tensorDescriptionBuilder_ == null) { - tensorDescriptionBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.TensorDescription, org.tensorflow.framework.TensorDescription.Builder, org.tensorflow.framework.TensorDescriptionOrBuilder>( - getTensorDescription(), - getParentForChildren(), - isClean()); - tensorDescription_ = null; - } - return tensorDescriptionBuilder_; - } - 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.NodeOutput) - } - - // @@protoc_insertion_point(class_scope:tensorflow.NodeOutput) - private static final org.tensorflow.framework.NodeOutput DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.NodeOutput(); - } - - public static org.tensorflow.framework.NodeOutput getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public NodeOutput parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new NodeOutput(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.NodeOutput getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/NodeOutputOrBuilder.java b/src/main/java/org/tensorflow/framework/NodeOutputOrBuilder.java deleted file mode 100644 index 38f2fae..0000000 --- a/src/main/java/org/tensorflow/framework/NodeOutputOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/step_stats.proto - -package org.tensorflow.framework; - -public interface NodeOutputOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.NodeOutput) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 slot = 1; - */ - int getSlot(); - - /** - * optional .tensorflow.TensorDescription tensor_description = 3; - */ - boolean hasTensorDescription(); - /** - * optional .tensorflow.TensorDescription tensor_description = 3; - */ - org.tensorflow.framework.TensorDescription getTensorDescription(); - /** - * optional .tensorflow.TensorDescription tensor_description = 3; - */ - org.tensorflow.framework.TensorDescriptionOrBuilder getTensorDescriptionOrBuilder(); -} diff --git a/src/main/java/org/tensorflow/framework/OpDef.java b/src/main/java/org/tensorflow/framework/OpDef.java deleted file mode 100644 index 525f716..0000000 --- a/src/main/java/org/tensorflow/framework/OpDef.java +++ /dev/null @@ -1,5378 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/op_def.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.OpDef} - * - *
- * Defines an operation. A NodeDef in a GraphDef specifies an Op by
- * using the "op" field which should match the name of a OpDef.
- * 
- */ -public final class OpDef extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.OpDef) - OpDefOrBuilder { - // Use OpDef.newBuilder() to construct. - private OpDef(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private OpDef() { - name_ = ""; - inputArg_ = java.util.Collections.emptyList(); - outputArg_ = java.util.Collections.emptyList(); - attr_ = java.util.Collections.emptyList(); - summary_ = ""; - description_ = ""; - isCommutative_ = false; - isAggregate_ = false; - isStateful_ = false; - allowsUninitializedInput_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private OpDef( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - inputArg_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - inputArg_.add(input.readMessage(org.tensorflow.framework.OpDef.ArgDef.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - outputArg_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - outputArg_.add(input.readMessage(org.tensorflow.framework.OpDef.ArgDef.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - attr_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - attr_.add(input.readMessage(org.tensorflow.framework.OpDef.AttrDef.parser(), extensionRegistry)); - break; - } - case 42: { - String s = input.readStringRequireUtf8(); - - summary_ = s; - break; - } - case 50: { - String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 128: { - - isAggregate_ = input.readBool(); - break; - } - case 136: { - - isStateful_ = input.readBool(); - break; - } - case 144: { - - isCommutative_ = input.readBool(); - break; - } - case 152: { - - allowsUninitializedInput_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - inputArg_ = java.util.Collections.unmodifiableList(inputArg_); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - outputArg_ = java.util.Collections.unmodifiableList(outputArg_); - } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - attr_ = java.util.Collections.unmodifiableList(attr_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.OpDef.class, org.tensorflow.framework.OpDef.Builder.class); - } - - public interface ArgDefOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.OpDef.ArgDef) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-     * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
-     * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-     * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
-     * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional string description = 2; - * - *
-     * Human readable description.
-     * 
- */ - java.lang.String getDescription(); - /** - * optional string description = 2; - * - *
-     * Human readable description.
-     * 
- */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - * optional .tensorflow.DataType type = 3; - * - *
-     * Describes the type of one or more tensors that are accepted/produced
-     * by this input/output arg.  The only legal combinations are:
-     * * For a single tensor: either the "type" field is set or the
-     *   "type_attr" field is set to the name of an attr with type "type".
-     * * For a sequence of tensors with the same type: the "number_attr"
-     *   field will be set to the name of an attr with type "int", and
-     *   either the "type" or "type_attr" field will be set as for
-     *   single tensors.
-     * * For a sequence of tensors, the "type_list_attr" field will be set
-     *   to the name of an attr with type "list(type)".
-     * 
- */ - int getTypeValue(); - /** - * optional .tensorflow.DataType type = 3; - * - *
-     * Describes the type of one or more tensors that are accepted/produced
-     * by this input/output arg.  The only legal combinations are:
-     * * For a single tensor: either the "type" field is set or the
-     *   "type_attr" field is set to the name of an attr with type "type".
-     * * For a sequence of tensors with the same type: the "number_attr"
-     *   field will be set to the name of an attr with type "int", and
-     *   either the "type" or "type_attr" field will be set as for
-     *   single tensors.
-     * * For a sequence of tensors, the "type_list_attr" field will be set
-     *   to the name of an attr with type "list(type)".
-     * 
- */ - org.tensorflow.framework.DataType getType(); - - /** - * optional string type_attr = 4; - * - *
-     * if specified, attr must have type "type"
-     * 
- */ - java.lang.String getTypeAttr(); - /** - * optional string type_attr = 4; - * - *
-     * if specified, attr must have type "type"
-     * 
- */ - com.google.protobuf.ByteString - getTypeAttrBytes(); - - /** - * optional string number_attr = 5; - * - *
-     * if specified, attr must have type "int"
-     * 
- */ - java.lang.String getNumberAttr(); - /** - * optional string number_attr = 5; - * - *
-     * if specified, attr must have type "int"
-     * 
- */ - com.google.protobuf.ByteString - getNumberAttrBytes(); - - /** - * optional string type_list_attr = 6; - * - *
-     * If specified, attr must have type "list(type)", and none of
-     * type, type_attr, and number_attr may be specified.
-     * 
- */ - java.lang.String getTypeListAttr(); - /** - * optional string type_list_attr = 6; - * - *
-     * If specified, attr must have type "list(type)", and none of
-     * type, type_attr, and number_attr may be specified.
-     * 
- */ - com.google.protobuf.ByteString - getTypeListAttrBytes(); - - /** - * optional bool is_ref = 16; - * - *
-     * For inputs: if true, the inputs are required to be refs.
-     *   By default, inputs can be either refs or non-refs.
-     * For outputs: if true, outputs are refs, otherwise they are not.
-     * 
- */ - boolean getIsRef(); - } - /** - * Protobuf type {@code tensorflow.OpDef.ArgDef} - * - *
-   * For describing inputs and outputs.
-   * 
- */ - public static final class ArgDef extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.OpDef.ArgDef) - ArgDefOrBuilder { - // Use ArgDef.newBuilder() to construct. - private ArgDef(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ArgDef() { - name_ = ""; - description_ = ""; - type_ = 0; - typeAttr_ = ""; - numberAttr_ = ""; - typeListAttr_ = ""; - isRef_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ArgDef( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 24: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - - typeAttr_ = s; - break; - } - case 42: { - String s = input.readStringRequireUtf8(); - - numberAttr_ = s; - break; - } - case 50: { - String s = input.readStringRequireUtf8(); - - typeListAttr_ = s; - break; - } - case 128: { - - isRef_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpDef_ArgDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpDef_ArgDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.OpDef.ArgDef.class, org.tensorflow.framework.OpDef.ArgDef.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-     * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
-     * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * optional string name = 1; - * - *
-     * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
-     * 
- */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; - /** - * optional string description = 2; - * - *
-     * Human readable description.
-     * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - /** - * optional string description = 2; - * - *
-     * Human readable description.
-     * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_FIELD_NUMBER = 3; - private int type_; - /** - * optional .tensorflow.DataType type = 3; - * - *
-     * Describes the type of one or more tensors that are accepted/produced
-     * by this input/output arg.  The only legal combinations are:
-     * * For a single tensor: either the "type" field is set or the
-     *   "type_attr" field is set to the name of an attr with type "type".
-     * * For a sequence of tensors with the same type: the "number_attr"
-     *   field will be set to the name of an attr with type "int", and
-     *   either the "type" or "type_attr" field will be set as for
-     *   single tensors.
-     * * For a sequence of tensors, the "type_list_attr" field will be set
-     *   to the name of an attr with type "list(type)".
-     * 
- */ - public int getTypeValue() { - return type_; - } - /** - * optional .tensorflow.DataType type = 3; - * - *
-     * Describes the type of one or more tensors that are accepted/produced
-     * by this input/output arg.  The only legal combinations are:
-     * * For a single tensor: either the "type" field is set or the
-     *   "type_attr" field is set to the name of an attr with type "type".
-     * * For a sequence of tensors with the same type: the "number_attr"
-     *   field will be set to the name of an attr with type "int", and
-     *   either the "type" or "type_attr" field will be set as for
-     *   single tensors.
-     * * For a sequence of tensors, the "type_list_attr" field will be set
-     *   to the name of an attr with type "list(type)".
-     * 
- */ - public org.tensorflow.framework.DataType getType() { - org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(type_); - return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result; - } - - public static final int TYPE_ATTR_FIELD_NUMBER = 4; - private volatile java.lang.Object typeAttr_; - /** - * optional string type_attr = 4; - * - *
-     * if specified, attr must have type "type"
-     * 
- */ - public java.lang.String getTypeAttr() { - java.lang.Object ref = typeAttr_; - 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(); - typeAttr_ = s; - return s; - } - } - /** - * optional string type_attr = 4; - * - *
-     * if specified, attr must have type "type"
-     * 
- */ - public com.google.protobuf.ByteString - getTypeAttrBytes() { - java.lang.Object ref = typeAttr_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - typeAttr_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NUMBER_ATTR_FIELD_NUMBER = 5; - private volatile java.lang.Object numberAttr_; - /** - * optional string number_attr = 5; - * - *
-     * if specified, attr must have type "int"
-     * 
- */ - public java.lang.String getNumberAttr() { - java.lang.Object ref = numberAttr_; - 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(); - numberAttr_ = s; - return s; - } - } - /** - * optional string number_attr = 5; - * - *
-     * if specified, attr must have type "int"
-     * 
- */ - public com.google.protobuf.ByteString - getNumberAttrBytes() { - java.lang.Object ref = numberAttr_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - numberAttr_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_LIST_ATTR_FIELD_NUMBER = 6; - private volatile java.lang.Object typeListAttr_; - /** - * optional string type_list_attr = 6; - * - *
-     * If specified, attr must have type "list(type)", and none of
-     * type, type_attr, and number_attr may be specified.
-     * 
- */ - public java.lang.String getTypeListAttr() { - java.lang.Object ref = typeListAttr_; - 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(); - typeListAttr_ = s; - return s; - } - } - /** - * optional string type_list_attr = 6; - * - *
-     * If specified, attr must have type "list(type)", and none of
-     * type, type_attr, and number_attr may be specified.
-     * 
- */ - public com.google.protobuf.ByteString - getTypeListAttrBytes() { - java.lang.Object ref = typeListAttr_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - typeListAttr_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IS_REF_FIELD_NUMBER = 16; - private boolean isRef_; - /** - * optional bool is_ref = 16; - * - *
-     * For inputs: if true, the inputs are required to be refs.
-     *   By default, inputs can be either refs or non-refs.
-     * For outputs: if true, outputs are refs, otherwise they are not.
-     * 
- */ - public boolean getIsRef() { - return isRef_; - } - - 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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); - } - if (type_ != org.tensorflow.framework.DataType.DT_INVALID.getNumber()) { - output.writeEnum(3, type_); - } - if (!getTypeAttrBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, typeAttr_); - } - if (!getNumberAttrBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, numberAttr_); - } - if (!getTypeListAttrBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, typeListAttr_); - } - if (isRef_ != false) { - output.writeBool(16, isRef_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); - } - if (type_ != org.tensorflow.framework.DataType.DT_INVALID.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, type_); - } - if (!getTypeAttrBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, typeAttr_); - } - if (!getNumberAttrBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(5, numberAttr_); - } - if (!getTypeListAttrBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(6, typeListAttr_); - } - if (isRef_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(16, isRef_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.OpDef.ArgDef parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.OpDef.ArgDef 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.OpDef.ArgDef parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.OpDef.ArgDef parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.OpDef.ArgDef parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.OpDef.ArgDef parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.OpDef.ArgDef parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.OpDef.ArgDef parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.OpDef.ArgDef parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.OpDef.ArgDef parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.OpDef.ArgDef 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.OpDef.ArgDef} - * - *
-     * For describing inputs and outputs.
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.OpDef.ArgDef) - org.tensorflow.framework.OpDef.ArgDefOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpDef_ArgDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpDef_ArgDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.OpDef.ArgDef.class, org.tensorflow.framework.OpDef.ArgDef.Builder.class); - } - - // Construct using org.tensorflow.framework.OpDef.ArgDef.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - description_ = ""; - - type_ = 0; - - typeAttr_ = ""; - - numberAttr_ = ""; - - typeListAttr_ = ""; - - isRef_ = false; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpDef_ArgDef_descriptor; - } - - public org.tensorflow.framework.OpDef.ArgDef getDefaultInstanceForType() { - return org.tensorflow.framework.OpDef.ArgDef.getDefaultInstance(); - } - - public org.tensorflow.framework.OpDef.ArgDef build() { - org.tensorflow.framework.OpDef.ArgDef result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.OpDef.ArgDef buildPartial() { - org.tensorflow.framework.OpDef.ArgDef result = new org.tensorflow.framework.OpDef.ArgDef(this); - result.name_ = name_; - result.description_ = description_; - result.type_ = type_; - result.typeAttr_ = typeAttr_; - result.numberAttr_ = numberAttr_; - result.typeListAttr_ = typeListAttr_; - result.isRef_ = isRef_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.OpDef.ArgDef) { - return mergeFrom((org.tensorflow.framework.OpDef.ArgDef)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.OpDef.ArgDef other) { - if (other == org.tensorflow.framework.OpDef.ArgDef.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (!other.getTypeAttr().isEmpty()) { - typeAttr_ = other.typeAttr_; - onChanged(); - } - if (!other.getNumberAttr().isEmpty()) { - numberAttr_ = other.numberAttr_; - onChanged(); - } - if (!other.getTypeListAttr().isEmpty()) { - typeListAttr_ = other.typeListAttr_; - onChanged(); - } - if (other.getIsRef() != false) { - setIsRef(other.getIsRef()); - } - 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.OpDef.ArgDef parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.OpDef.ArgDef) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-       * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
-       * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - * - *
-       * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
-       * 
- */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - * - *
-       * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
-       * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-       * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
-       * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-       * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
-       * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * optional string description = 2; - * - *
-       * Human readable description.
-       * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string description = 2; - * - *
-       * Human readable description.
-       * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string description = 2; - * - *
-       * Human readable description.
-       * 
- */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * optional string description = 2; - * - *
-       * Human readable description.
-       * 
- */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * optional string description = 2; - * - *
-       * Human readable description.
-       * 
- */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private int type_ = 0; - /** - * optional .tensorflow.DataType type = 3; - * - *
-       * Describes the type of one or more tensors that are accepted/produced
-       * by this input/output arg.  The only legal combinations are:
-       * * For a single tensor: either the "type" field is set or the
-       *   "type_attr" field is set to the name of an attr with type "type".
-       * * For a sequence of tensors with the same type: the "number_attr"
-       *   field will be set to the name of an attr with type "int", and
-       *   either the "type" or "type_attr" field will be set as for
-       *   single tensors.
-       * * For a sequence of tensors, the "type_list_attr" field will be set
-       *   to the name of an attr with type "list(type)".
-       * 
- */ - public int getTypeValue() { - return type_; - } - /** - * optional .tensorflow.DataType type = 3; - * - *
-       * Describes the type of one or more tensors that are accepted/produced
-       * by this input/output arg.  The only legal combinations are:
-       * * For a single tensor: either the "type" field is set or the
-       *   "type_attr" field is set to the name of an attr with type "type".
-       * * For a sequence of tensors with the same type: the "number_attr"
-       *   field will be set to the name of an attr with type "int", and
-       *   either the "type" or "type_attr" field will be set as for
-       *   single tensors.
-       * * For a sequence of tensors, the "type_list_attr" field will be set
-       *   to the name of an attr with type "list(type)".
-       * 
- */ - public Builder setTypeValue(int value) { - type_ = value; - onChanged(); - return this; - } - /** - * optional .tensorflow.DataType type = 3; - * - *
-       * Describes the type of one or more tensors that are accepted/produced
-       * by this input/output arg.  The only legal combinations are:
-       * * For a single tensor: either the "type" field is set or the
-       *   "type_attr" field is set to the name of an attr with type "type".
-       * * For a sequence of tensors with the same type: the "number_attr"
-       *   field will be set to the name of an attr with type "int", and
-       *   either the "type" or "type_attr" field will be set as for
-       *   single tensors.
-       * * For a sequence of tensors, the "type_list_attr" field will be set
-       *   to the name of an attr with type "list(type)".
-       * 
- */ - public org.tensorflow.framework.DataType getType() { - org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(type_); - return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result; - } - /** - * optional .tensorflow.DataType type = 3; - * - *
-       * Describes the type of one or more tensors that are accepted/produced
-       * by this input/output arg.  The only legal combinations are:
-       * * For a single tensor: either the "type" field is set or the
-       *   "type_attr" field is set to the name of an attr with type "type".
-       * * For a sequence of tensors with the same type: the "number_attr"
-       *   field will be set to the name of an attr with type "int", and
-       *   either the "type" or "type_attr" field will be set as for
-       *   single tensors.
-       * * For a sequence of tensors, the "type_list_attr" field will be set
-       *   to the name of an attr with type "list(type)".
-       * 
- */ - public Builder setType(org.tensorflow.framework.DataType value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .tensorflow.DataType type = 3; - * - *
-       * Describes the type of one or more tensors that are accepted/produced
-       * by this input/output arg.  The only legal combinations are:
-       * * For a single tensor: either the "type" field is set or the
-       *   "type_attr" field is set to the name of an attr with type "type".
-       * * For a sequence of tensors with the same type: the "number_attr"
-       *   field will be set to the name of an attr with type "int", and
-       *   either the "type" or "type_attr" field will be set as for
-       *   single tensors.
-       * * For a sequence of tensors, the "type_list_attr" field will be set
-       *   to the name of an attr with type "list(type)".
-       * 
- */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private java.lang.Object typeAttr_ = ""; - /** - * optional string type_attr = 4; - * - *
-       * if specified, attr must have type "type"
-       * 
- */ - public java.lang.String getTypeAttr() { - java.lang.Object ref = typeAttr_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - typeAttr_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string type_attr = 4; - * - *
-       * if specified, attr must have type "type"
-       * 
- */ - public com.google.protobuf.ByteString - getTypeAttrBytes() { - java.lang.Object ref = typeAttr_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - typeAttr_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string type_attr = 4; - * - *
-       * if specified, attr must have type "type"
-       * 
- */ - public Builder setTypeAttr( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - typeAttr_ = value; - onChanged(); - return this; - } - /** - * optional string type_attr = 4; - * - *
-       * if specified, attr must have type "type"
-       * 
- */ - public Builder clearTypeAttr() { - - typeAttr_ = getDefaultInstance().getTypeAttr(); - onChanged(); - return this; - } - /** - * optional string type_attr = 4; - * - *
-       * if specified, attr must have type "type"
-       * 
- */ - public Builder setTypeAttrBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - typeAttr_ = value; - onChanged(); - return this; - } - - private java.lang.Object numberAttr_ = ""; - /** - * optional string number_attr = 5; - * - *
-       * if specified, attr must have type "int"
-       * 
- */ - public java.lang.String getNumberAttr() { - java.lang.Object ref = numberAttr_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - numberAttr_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string number_attr = 5; - * - *
-       * if specified, attr must have type "int"
-       * 
- */ - public com.google.protobuf.ByteString - getNumberAttrBytes() { - java.lang.Object ref = numberAttr_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - numberAttr_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string number_attr = 5; - * - *
-       * if specified, attr must have type "int"
-       * 
- */ - public Builder setNumberAttr( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - numberAttr_ = value; - onChanged(); - return this; - } - /** - * optional string number_attr = 5; - * - *
-       * if specified, attr must have type "int"
-       * 
- */ - public Builder clearNumberAttr() { - - numberAttr_ = getDefaultInstance().getNumberAttr(); - onChanged(); - return this; - } - /** - * optional string number_attr = 5; - * - *
-       * if specified, attr must have type "int"
-       * 
- */ - public Builder setNumberAttrBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - numberAttr_ = value; - onChanged(); - return this; - } - - private java.lang.Object typeListAttr_ = ""; - /** - * optional string type_list_attr = 6; - * - *
-       * If specified, attr must have type "list(type)", and none of
-       * type, type_attr, and number_attr may be specified.
-       * 
- */ - public java.lang.String getTypeListAttr() { - java.lang.Object ref = typeListAttr_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - typeListAttr_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string type_list_attr = 6; - * - *
-       * If specified, attr must have type "list(type)", and none of
-       * type, type_attr, and number_attr may be specified.
-       * 
- */ - public com.google.protobuf.ByteString - getTypeListAttrBytes() { - java.lang.Object ref = typeListAttr_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - typeListAttr_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string type_list_attr = 6; - * - *
-       * If specified, attr must have type "list(type)", and none of
-       * type, type_attr, and number_attr may be specified.
-       * 
- */ - public Builder setTypeListAttr( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - typeListAttr_ = value; - onChanged(); - return this; - } - /** - * optional string type_list_attr = 6; - * - *
-       * If specified, attr must have type "list(type)", and none of
-       * type, type_attr, and number_attr may be specified.
-       * 
- */ - public Builder clearTypeListAttr() { - - typeListAttr_ = getDefaultInstance().getTypeListAttr(); - onChanged(); - return this; - } - /** - * optional string type_list_attr = 6; - * - *
-       * If specified, attr must have type "list(type)", and none of
-       * type, type_attr, and number_attr may be specified.
-       * 
- */ - public Builder setTypeListAttrBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - typeListAttr_ = value; - onChanged(); - return this; - } - - private boolean isRef_ ; - /** - * optional bool is_ref = 16; - * - *
-       * For inputs: if true, the inputs are required to be refs.
-       *   By default, inputs can be either refs or non-refs.
-       * For outputs: if true, outputs are refs, otherwise they are not.
-       * 
- */ - public boolean getIsRef() { - return isRef_; - } - /** - * optional bool is_ref = 16; - * - *
-       * For inputs: if true, the inputs are required to be refs.
-       *   By default, inputs can be either refs or non-refs.
-       * For outputs: if true, outputs are refs, otherwise they are not.
-       * 
- */ - public Builder setIsRef(boolean value) { - - isRef_ = value; - onChanged(); - return this; - } - /** - * optional bool is_ref = 16; - * - *
-       * For inputs: if true, the inputs are required to be refs.
-       *   By default, inputs can be either refs or non-refs.
-       * For outputs: if true, outputs are refs, otherwise they are not.
-       * 
- */ - public Builder clearIsRef() { - - isRef_ = false; - 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.OpDef.ArgDef) - } - - // @@protoc_insertion_point(class_scope:tensorflow.OpDef.ArgDef) - private static final org.tensorflow.framework.OpDef.ArgDef DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.OpDef.ArgDef(); - } - - public static org.tensorflow.framework.OpDef.ArgDef getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ArgDef parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ArgDef(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.OpDef.ArgDef getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface AttrDefOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.OpDef.AttrDef) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-     * A descriptive name for the argument.  May be used, e.g. by the
-     * Python client, as a keyword argument name, and so should match
-     * the regexp "[a-z][a-z0-9_]+".
-     * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-     * A descriptive name for the argument.  May be used, e.g. by the
-     * Python client, as a keyword argument name, and so should match
-     * the regexp "[a-z][a-z0-9_]+".
-     * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional string type = 2; - * - *
-     * One of the type names from attr_value.proto ("string", "list(string)",
-     * "int", etc.).
-     * 
- */ - java.lang.String getType(); - /** - * optional string type = 2; - * - *
-     * One of the type names from attr_value.proto ("string", "list(string)",
-     * "int", etc.).
-     * 
- */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - * optional .tensorflow.AttrValue default_value = 3; - * - *
-     * A reasonable default for this attribute if the user does not supply
-     * a value.  If not specified, the user must supply a value.
-     * 
- */ - boolean hasDefaultValue(); - /** - * optional .tensorflow.AttrValue default_value = 3; - * - *
-     * A reasonable default for this attribute if the user does not supply
-     * a value.  If not specified, the user must supply a value.
-     * 
- */ - org.tensorflow.framework.AttrValue getDefaultValue(); - /** - * optional .tensorflow.AttrValue default_value = 3; - * - *
-     * A reasonable default for this attribute if the user does not supply
-     * a value.  If not specified, the user must supply a value.
-     * 
- */ - org.tensorflow.framework.AttrValueOrBuilder getDefaultValueOrBuilder(); - - /** - * optional string description = 4; - * - *
-     * Human-readable description.
-     * 
- */ - java.lang.String getDescription(); - /** - * optional string description = 4; - * - *
-     * Human-readable description.
-     * 
- */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - * optional bool has_minimum = 5; - * - *
-     * For type == "int", this is a minimum value.  For "list(___)"
-     * types, this is the minimum length.
-     * 
- */ - boolean getHasMinimum(); - - /** - * optional int64 minimum = 6; - */ - long getMinimum(); - - /** - * optional .tensorflow.AttrValue allowed_values = 7; - * - *
-     * The set of allowed values.  Has type that is the "list" version
-     * of the "type" field above (uses the ..._list, fields of AttrValue).
-     * If type == "type" or "list(type)" above, then the type_list field
-     * of allowed_values has the set of allowed DataTypes.
-     * If type == "string" or "list(string)", then the s_list field has
-     * the set of allowed strings.
-     * 
- */ - boolean hasAllowedValues(); - /** - * optional .tensorflow.AttrValue allowed_values = 7; - * - *
-     * The set of allowed values.  Has type that is the "list" version
-     * of the "type" field above (uses the ..._list, fields of AttrValue).
-     * If type == "type" or "list(type)" above, then the type_list field
-     * of allowed_values has the set of allowed DataTypes.
-     * If type == "string" or "list(string)", then the s_list field has
-     * the set of allowed strings.
-     * 
- */ - org.tensorflow.framework.AttrValue getAllowedValues(); - /** - * optional .tensorflow.AttrValue allowed_values = 7; - * - *
-     * The set of allowed values.  Has type that is the "list" version
-     * of the "type" field above (uses the ..._list, fields of AttrValue).
-     * If type == "type" or "list(type)" above, then the type_list field
-     * of allowed_values has the set of allowed DataTypes.
-     * If type == "string" or "list(string)", then the s_list field has
-     * the set of allowed strings.
-     * 
- */ - org.tensorflow.framework.AttrValueOrBuilder getAllowedValuesOrBuilder(); - } - /** - * Protobuf type {@code tensorflow.OpDef.AttrDef} - * - *
-   * Description of the graph-construction-time configuration of this
-   * Op.  That is to say, this describes the attr fields that will
-   * be specified in the NodeDef.
-   * 
- */ - public static final class AttrDef extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.OpDef.AttrDef) - AttrDefOrBuilder { - // Use AttrDef.newBuilder() to construct. - private AttrDef(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private AttrDef() { - name_ = ""; - type_ = ""; - description_ = ""; - hasMinimum_ = false; - minimum_ = 0L; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private AttrDef( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 26: { - org.tensorflow.framework.AttrValue.Builder subBuilder = null; - if (defaultValue_ != null) { - subBuilder = defaultValue_.toBuilder(); - } - defaultValue_ = input.readMessage(org.tensorflow.framework.AttrValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(defaultValue_); - defaultValue_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 40: { - - hasMinimum_ = input.readBool(); - break; - } - case 48: { - - minimum_ = input.readInt64(); - break; - } - case 58: { - org.tensorflow.framework.AttrValue.Builder subBuilder = null; - if (allowedValues_ != null) { - subBuilder = allowedValues_.toBuilder(); - } - allowedValues_ = input.readMessage(org.tensorflow.framework.AttrValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(allowedValues_); - allowedValues_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpDef_AttrDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpDef_AttrDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.OpDef.AttrDef.class, org.tensorflow.framework.OpDef.AttrDef.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-     * A descriptive name for the argument.  May be used, e.g. by the
-     * Python client, as a keyword argument name, and so should match
-     * the regexp "[a-z][a-z0-9_]+".
-     * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * optional string name = 1; - * - *
-     * A descriptive name for the argument.  May be used, e.g. by the
-     * Python client, as a keyword argument name, and so should match
-     * the regexp "[a-z][a-z0-9_]+".
-     * 
- */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object type_; - /** - * optional string type = 2; - * - *
-     * One of the type names from attr_value.proto ("string", "list(string)",
-     * "int", etc.).
-     * 
- */ - public java.lang.String getType() { - java.lang.Object ref = type_; - 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(); - type_ = s; - return s; - } - } - /** - * optional string type = 2; - * - *
-     * One of the type names from attr_value.proto ("string", "list(string)",
-     * "int", etc.).
-     * 
- */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEFAULT_VALUE_FIELD_NUMBER = 3; - private org.tensorflow.framework.AttrValue defaultValue_; - /** - * optional .tensorflow.AttrValue default_value = 3; - * - *
-     * A reasonable default for this attribute if the user does not supply
-     * a value.  If not specified, the user must supply a value.
-     * 
- */ - public boolean hasDefaultValue() { - return defaultValue_ != null; - } - /** - * optional .tensorflow.AttrValue default_value = 3; - * - *
-     * A reasonable default for this attribute if the user does not supply
-     * a value.  If not specified, the user must supply a value.
-     * 
- */ - public org.tensorflow.framework.AttrValue getDefaultValue() { - return defaultValue_ == null ? org.tensorflow.framework.AttrValue.getDefaultInstance() : defaultValue_; - } - /** - * optional .tensorflow.AttrValue default_value = 3; - * - *
-     * A reasonable default for this attribute if the user does not supply
-     * a value.  If not specified, the user must supply a value.
-     * 
- */ - public org.tensorflow.framework.AttrValueOrBuilder getDefaultValueOrBuilder() { - return getDefaultValue(); - } - - public static final int DESCRIPTION_FIELD_NUMBER = 4; - private volatile java.lang.Object description_; - /** - * optional string description = 4; - * - *
-     * Human-readable description.
-     * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - /** - * optional string description = 4; - * - *
-     * Human-readable description.
-     * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int HAS_MINIMUM_FIELD_NUMBER = 5; - private boolean hasMinimum_; - /** - * optional bool has_minimum = 5; - * - *
-     * For type == "int", this is a minimum value.  For "list(___)"
-     * types, this is the minimum length.
-     * 
- */ - public boolean getHasMinimum() { - return hasMinimum_; - } - - public static final int MINIMUM_FIELD_NUMBER = 6; - private long minimum_; - /** - * optional int64 minimum = 6; - */ - public long getMinimum() { - return minimum_; - } - - public static final int ALLOWED_VALUES_FIELD_NUMBER = 7; - private org.tensorflow.framework.AttrValue allowedValues_; - /** - * optional .tensorflow.AttrValue allowed_values = 7; - * - *
-     * The set of allowed values.  Has type that is the "list" version
-     * of the "type" field above (uses the ..._list, fields of AttrValue).
-     * If type == "type" or "list(type)" above, then the type_list field
-     * of allowed_values has the set of allowed DataTypes.
-     * If type == "string" or "list(string)", then the s_list field has
-     * the set of allowed strings.
-     * 
- */ - public boolean hasAllowedValues() { - return allowedValues_ != null; - } - /** - * optional .tensorflow.AttrValue allowed_values = 7; - * - *
-     * The set of allowed values.  Has type that is the "list" version
-     * of the "type" field above (uses the ..._list, fields of AttrValue).
-     * If type == "type" or "list(type)" above, then the type_list field
-     * of allowed_values has the set of allowed DataTypes.
-     * If type == "string" or "list(string)", then the s_list field has
-     * the set of allowed strings.
-     * 
- */ - public org.tensorflow.framework.AttrValue getAllowedValues() { - return allowedValues_ == null ? org.tensorflow.framework.AttrValue.getDefaultInstance() : allowedValues_; - } - /** - * optional .tensorflow.AttrValue allowed_values = 7; - * - *
-     * The set of allowed values.  Has type that is the "list" version
-     * of the "type" field above (uses the ..._list, fields of AttrValue).
-     * If type == "type" or "list(type)" above, then the type_list field
-     * of allowed_values has the set of allowed DataTypes.
-     * If type == "string" or "list(string)", then the s_list field has
-     * the set of allowed strings.
-     * 
- */ - public org.tensorflow.framework.AttrValueOrBuilder getAllowedValuesOrBuilder() { - return getAllowedValues(); - } - - 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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (!getTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, type_); - } - if (defaultValue_ != null) { - output.writeMessage(3, getDefaultValue()); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, description_); - } - if (hasMinimum_ != false) { - output.writeBool(5, hasMinimum_); - } - if (minimum_ != 0L) { - output.writeInt64(6, minimum_); - } - if (allowedValues_ != null) { - output.writeMessage(7, getAllowedValues()); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (!getTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, type_); - } - if (defaultValue_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getDefaultValue()); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, description_); - } - if (hasMinimum_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, hasMinimum_); - } - if (minimum_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(6, minimum_); - } - if (allowedValues_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getAllowedValues()); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.OpDef.AttrDef parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.OpDef.AttrDef 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.OpDef.AttrDef parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.OpDef.AttrDef parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.OpDef.AttrDef parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.OpDef.AttrDef parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.OpDef.AttrDef parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.OpDef.AttrDef parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.OpDef.AttrDef parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.OpDef.AttrDef parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.OpDef.AttrDef 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.OpDef.AttrDef} - * - *
-     * Description of the graph-construction-time configuration of this
-     * Op.  That is to say, this describes the attr fields that will
-     * be specified in the NodeDef.
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.OpDef.AttrDef) - org.tensorflow.framework.OpDef.AttrDefOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpDef_AttrDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpDef_AttrDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.OpDef.AttrDef.class, org.tensorflow.framework.OpDef.AttrDef.Builder.class); - } - - // Construct using org.tensorflow.framework.OpDef.AttrDef.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - type_ = ""; - - if (defaultValueBuilder_ == null) { - defaultValue_ = null; - } else { - defaultValue_ = null; - defaultValueBuilder_ = null; - } - description_ = ""; - - hasMinimum_ = false; - - minimum_ = 0L; - - if (allowedValuesBuilder_ == null) { - allowedValues_ = null; - } else { - allowedValues_ = null; - allowedValuesBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpDef_AttrDef_descriptor; - } - - public org.tensorflow.framework.OpDef.AttrDef getDefaultInstanceForType() { - return org.tensorflow.framework.OpDef.AttrDef.getDefaultInstance(); - } - - public org.tensorflow.framework.OpDef.AttrDef build() { - org.tensorflow.framework.OpDef.AttrDef result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.OpDef.AttrDef buildPartial() { - org.tensorflow.framework.OpDef.AttrDef result = new org.tensorflow.framework.OpDef.AttrDef(this); - result.name_ = name_; - result.type_ = type_; - if (defaultValueBuilder_ == null) { - result.defaultValue_ = defaultValue_; - } else { - result.defaultValue_ = defaultValueBuilder_.build(); - } - result.description_ = description_; - result.hasMinimum_ = hasMinimum_; - result.minimum_ = minimum_; - if (allowedValuesBuilder_ == null) { - result.allowedValues_ = allowedValues_; - } else { - result.allowedValues_ = allowedValuesBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.OpDef.AttrDef) { - return mergeFrom((org.tensorflow.framework.OpDef.AttrDef)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.OpDef.AttrDef other) { - if (other == org.tensorflow.framework.OpDef.AttrDef.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getType().isEmpty()) { - type_ = other.type_; - onChanged(); - } - if (other.hasDefaultValue()) { - mergeDefaultValue(other.getDefaultValue()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.getHasMinimum() != false) { - setHasMinimum(other.getHasMinimum()); - } - if (other.getMinimum() != 0L) { - setMinimum(other.getMinimum()); - } - if (other.hasAllowedValues()) { - mergeAllowedValues(other.getAllowedValues()); - } - 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.OpDef.AttrDef parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.OpDef.AttrDef) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-       * A descriptive name for the argument.  May be used, e.g. by the
-       * Python client, as a keyword argument name, and so should match
-       * the regexp "[a-z][a-z0-9_]+".
-       * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - * - *
-       * A descriptive name for the argument.  May be used, e.g. by the
-       * Python client, as a keyword argument name, and so should match
-       * the regexp "[a-z][a-z0-9_]+".
-       * 
- */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - * - *
-       * A descriptive name for the argument.  May be used, e.g. by the
-       * Python client, as a keyword argument name, and so should match
-       * the regexp "[a-z][a-z0-9_]+".
-       * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-       * A descriptive name for the argument.  May be used, e.g. by the
-       * Python client, as a keyword argument name, and so should match
-       * the regexp "[a-z][a-z0-9_]+".
-       * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-       * A descriptive name for the argument.  May be used, e.g. by the
-       * Python client, as a keyword argument name, and so should match
-       * the regexp "[a-z][a-z0-9_]+".
-       * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object type_ = ""; - /** - * optional string type = 2; - * - *
-       * One of the type names from attr_value.proto ("string", "list(string)",
-       * "int", etc.).
-       * 
- */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string type = 2; - * - *
-       * One of the type names from attr_value.proto ("string", "list(string)",
-       * "int", etc.).
-       * 
- */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string type = 2; - * - *
-       * One of the type names from attr_value.proto ("string", "list(string)",
-       * "int", etc.).
-       * 
- */ - public Builder setType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value; - onChanged(); - return this; - } - /** - * optional string type = 2; - * - *
-       * One of the type names from attr_value.proto ("string", "list(string)",
-       * "int", etc.).
-       * 
- */ - public Builder clearType() { - - type_ = getDefaultInstance().getType(); - onChanged(); - return this; - } - /** - * optional string type = 2; - * - *
-       * One of the type names from attr_value.proto ("string", "list(string)",
-       * "int", etc.).
-       * 
- */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - type_ = value; - onChanged(); - return this; - } - - private org.tensorflow.framework.AttrValue defaultValue_ = null; - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.AttrValue, org.tensorflow.framework.AttrValue.Builder, org.tensorflow.framework.AttrValueOrBuilder> defaultValueBuilder_; - /** - * optional .tensorflow.AttrValue default_value = 3; - * - *
-       * A reasonable default for this attribute if the user does not supply
-       * a value.  If not specified, the user must supply a value.
-       * 
- */ - public boolean hasDefaultValue() { - return defaultValueBuilder_ != null || defaultValue_ != null; - } - /** - * optional .tensorflow.AttrValue default_value = 3; - * - *
-       * A reasonable default for this attribute if the user does not supply
-       * a value.  If not specified, the user must supply a value.
-       * 
- */ - public org.tensorflow.framework.AttrValue getDefaultValue() { - if (defaultValueBuilder_ == null) { - return defaultValue_ == null ? org.tensorflow.framework.AttrValue.getDefaultInstance() : defaultValue_; - } else { - return defaultValueBuilder_.getMessage(); - } - } - /** - * optional .tensorflow.AttrValue default_value = 3; - * - *
-       * A reasonable default for this attribute if the user does not supply
-       * a value.  If not specified, the user must supply a value.
-       * 
- */ - public Builder setDefaultValue(org.tensorflow.framework.AttrValue value) { - if (defaultValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - defaultValue_ = value; - onChanged(); - } else { - defaultValueBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .tensorflow.AttrValue default_value = 3; - * - *
-       * A reasonable default for this attribute if the user does not supply
-       * a value.  If not specified, the user must supply a value.
-       * 
- */ - public Builder setDefaultValue( - org.tensorflow.framework.AttrValue.Builder builderForValue) { - if (defaultValueBuilder_ == null) { - defaultValue_ = builderForValue.build(); - onChanged(); - } else { - defaultValueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .tensorflow.AttrValue default_value = 3; - * - *
-       * A reasonable default for this attribute if the user does not supply
-       * a value.  If not specified, the user must supply a value.
-       * 
- */ - public Builder mergeDefaultValue(org.tensorflow.framework.AttrValue value) { - if (defaultValueBuilder_ == null) { - if (defaultValue_ != null) { - defaultValue_ = - org.tensorflow.framework.AttrValue.newBuilder(defaultValue_).mergeFrom(value).buildPartial(); - } else { - defaultValue_ = value; - } - onChanged(); - } else { - defaultValueBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .tensorflow.AttrValue default_value = 3; - * - *
-       * A reasonable default for this attribute if the user does not supply
-       * a value.  If not specified, the user must supply a value.
-       * 
- */ - public Builder clearDefaultValue() { - if (defaultValueBuilder_ == null) { - defaultValue_ = null; - onChanged(); - } else { - defaultValue_ = null; - defaultValueBuilder_ = null; - } - - return this; - } - /** - * optional .tensorflow.AttrValue default_value = 3; - * - *
-       * A reasonable default for this attribute if the user does not supply
-       * a value.  If not specified, the user must supply a value.
-       * 
- */ - public org.tensorflow.framework.AttrValue.Builder getDefaultValueBuilder() { - - onChanged(); - return getDefaultValueFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.AttrValue default_value = 3; - * - *
-       * A reasonable default for this attribute if the user does not supply
-       * a value.  If not specified, the user must supply a value.
-       * 
- */ - public org.tensorflow.framework.AttrValueOrBuilder getDefaultValueOrBuilder() { - if (defaultValueBuilder_ != null) { - return defaultValueBuilder_.getMessageOrBuilder(); - } else { - return defaultValue_ == null ? - org.tensorflow.framework.AttrValue.getDefaultInstance() : defaultValue_; - } - } - /** - * optional .tensorflow.AttrValue default_value = 3; - * - *
-       * A reasonable default for this attribute if the user does not supply
-       * a value.  If not specified, the user must supply a value.
-       * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.AttrValue, org.tensorflow.framework.AttrValue.Builder, org.tensorflow.framework.AttrValueOrBuilder> - getDefaultValueFieldBuilder() { - if (defaultValueBuilder_ == null) { - defaultValueBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.AttrValue, org.tensorflow.framework.AttrValue.Builder, org.tensorflow.framework.AttrValueOrBuilder>( - getDefaultValue(), - getParentForChildren(), - isClean()); - defaultValue_ = null; - } - return defaultValueBuilder_; - } - - private java.lang.Object description_ = ""; - /** - * optional string description = 4; - * - *
-       * Human-readable description.
-       * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string description = 4; - * - *
-       * Human-readable description.
-       * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string description = 4; - * - *
-       * Human-readable description.
-       * 
- */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * optional string description = 4; - * - *
-       * Human-readable description.
-       * 
- */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * optional string description = 4; - * - *
-       * Human-readable description.
-       * 
- */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private boolean hasMinimum_ ; - /** - * optional bool has_minimum = 5; - * - *
-       * For type == "int", this is a minimum value.  For "list(___)"
-       * types, this is the minimum length.
-       * 
- */ - public boolean getHasMinimum() { - return hasMinimum_; - } - /** - * optional bool has_minimum = 5; - * - *
-       * For type == "int", this is a minimum value.  For "list(___)"
-       * types, this is the minimum length.
-       * 
- */ - public Builder setHasMinimum(boolean value) { - - hasMinimum_ = value; - onChanged(); - return this; - } - /** - * optional bool has_minimum = 5; - * - *
-       * For type == "int", this is a minimum value.  For "list(___)"
-       * types, this is the minimum length.
-       * 
- */ - public Builder clearHasMinimum() { - - hasMinimum_ = false; - onChanged(); - return this; - } - - private long minimum_ ; - /** - * optional int64 minimum = 6; - */ - public long getMinimum() { - return minimum_; - } - /** - * optional int64 minimum = 6; - */ - public Builder setMinimum(long value) { - - minimum_ = value; - onChanged(); - return this; - } - /** - * optional int64 minimum = 6; - */ - public Builder clearMinimum() { - - minimum_ = 0L; - onChanged(); - return this; - } - - private org.tensorflow.framework.AttrValue allowedValues_ = null; - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.AttrValue, org.tensorflow.framework.AttrValue.Builder, org.tensorflow.framework.AttrValueOrBuilder> allowedValuesBuilder_; - /** - * optional .tensorflow.AttrValue allowed_values = 7; - * - *
-       * The set of allowed values.  Has type that is the "list" version
-       * of the "type" field above (uses the ..._list, fields of AttrValue).
-       * If type == "type" or "list(type)" above, then the type_list field
-       * of allowed_values has the set of allowed DataTypes.
-       * If type == "string" or "list(string)", then the s_list field has
-       * the set of allowed strings.
-       * 
- */ - public boolean hasAllowedValues() { - return allowedValuesBuilder_ != null || allowedValues_ != null; - } - /** - * optional .tensorflow.AttrValue allowed_values = 7; - * - *
-       * The set of allowed values.  Has type that is the "list" version
-       * of the "type" field above (uses the ..._list, fields of AttrValue).
-       * If type == "type" or "list(type)" above, then the type_list field
-       * of allowed_values has the set of allowed DataTypes.
-       * If type == "string" or "list(string)", then the s_list field has
-       * the set of allowed strings.
-       * 
- */ - public org.tensorflow.framework.AttrValue getAllowedValues() { - if (allowedValuesBuilder_ == null) { - return allowedValues_ == null ? org.tensorflow.framework.AttrValue.getDefaultInstance() : allowedValues_; - } else { - return allowedValuesBuilder_.getMessage(); - } - } - /** - * optional .tensorflow.AttrValue allowed_values = 7; - * - *
-       * The set of allowed values.  Has type that is the "list" version
-       * of the "type" field above (uses the ..._list, fields of AttrValue).
-       * If type == "type" or "list(type)" above, then the type_list field
-       * of allowed_values has the set of allowed DataTypes.
-       * If type == "string" or "list(string)", then the s_list field has
-       * the set of allowed strings.
-       * 
- */ - public Builder setAllowedValues(org.tensorflow.framework.AttrValue value) { - if (allowedValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - allowedValues_ = value; - onChanged(); - } else { - allowedValuesBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .tensorflow.AttrValue allowed_values = 7; - * - *
-       * The set of allowed values.  Has type that is the "list" version
-       * of the "type" field above (uses the ..._list, fields of AttrValue).
-       * If type == "type" or "list(type)" above, then the type_list field
-       * of allowed_values has the set of allowed DataTypes.
-       * If type == "string" or "list(string)", then the s_list field has
-       * the set of allowed strings.
-       * 
- */ - public Builder setAllowedValues( - org.tensorflow.framework.AttrValue.Builder builderForValue) { - if (allowedValuesBuilder_ == null) { - allowedValues_ = builderForValue.build(); - onChanged(); - } else { - allowedValuesBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .tensorflow.AttrValue allowed_values = 7; - * - *
-       * The set of allowed values.  Has type that is the "list" version
-       * of the "type" field above (uses the ..._list, fields of AttrValue).
-       * If type == "type" or "list(type)" above, then the type_list field
-       * of allowed_values has the set of allowed DataTypes.
-       * If type == "string" or "list(string)", then the s_list field has
-       * the set of allowed strings.
-       * 
- */ - public Builder mergeAllowedValues(org.tensorflow.framework.AttrValue value) { - if (allowedValuesBuilder_ == null) { - if (allowedValues_ != null) { - allowedValues_ = - org.tensorflow.framework.AttrValue.newBuilder(allowedValues_).mergeFrom(value).buildPartial(); - } else { - allowedValues_ = value; - } - onChanged(); - } else { - allowedValuesBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .tensorflow.AttrValue allowed_values = 7; - * - *
-       * The set of allowed values.  Has type that is the "list" version
-       * of the "type" field above (uses the ..._list, fields of AttrValue).
-       * If type == "type" or "list(type)" above, then the type_list field
-       * of allowed_values has the set of allowed DataTypes.
-       * If type == "string" or "list(string)", then the s_list field has
-       * the set of allowed strings.
-       * 
- */ - public Builder clearAllowedValues() { - if (allowedValuesBuilder_ == null) { - allowedValues_ = null; - onChanged(); - } else { - allowedValues_ = null; - allowedValuesBuilder_ = null; - } - - return this; - } - /** - * optional .tensorflow.AttrValue allowed_values = 7; - * - *
-       * The set of allowed values.  Has type that is the "list" version
-       * of the "type" field above (uses the ..._list, fields of AttrValue).
-       * If type == "type" or "list(type)" above, then the type_list field
-       * of allowed_values has the set of allowed DataTypes.
-       * If type == "string" or "list(string)", then the s_list field has
-       * the set of allowed strings.
-       * 
- */ - public org.tensorflow.framework.AttrValue.Builder getAllowedValuesBuilder() { - - onChanged(); - return getAllowedValuesFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.AttrValue allowed_values = 7; - * - *
-       * The set of allowed values.  Has type that is the "list" version
-       * of the "type" field above (uses the ..._list, fields of AttrValue).
-       * If type == "type" or "list(type)" above, then the type_list field
-       * of allowed_values has the set of allowed DataTypes.
-       * If type == "string" or "list(string)", then the s_list field has
-       * the set of allowed strings.
-       * 
- */ - public org.tensorflow.framework.AttrValueOrBuilder getAllowedValuesOrBuilder() { - if (allowedValuesBuilder_ != null) { - return allowedValuesBuilder_.getMessageOrBuilder(); - } else { - return allowedValues_ == null ? - org.tensorflow.framework.AttrValue.getDefaultInstance() : allowedValues_; - } - } - /** - * optional .tensorflow.AttrValue allowed_values = 7; - * - *
-       * The set of allowed values.  Has type that is the "list" version
-       * of the "type" field above (uses the ..._list, fields of AttrValue).
-       * If type == "type" or "list(type)" above, then the type_list field
-       * of allowed_values has the set of allowed DataTypes.
-       * If type == "string" or "list(string)", then the s_list field has
-       * the set of allowed strings.
-       * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.AttrValue, org.tensorflow.framework.AttrValue.Builder, org.tensorflow.framework.AttrValueOrBuilder> - getAllowedValuesFieldBuilder() { - if (allowedValuesBuilder_ == null) { - allowedValuesBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.AttrValue, org.tensorflow.framework.AttrValue.Builder, org.tensorflow.framework.AttrValueOrBuilder>( - getAllowedValues(), - getParentForChildren(), - isClean()); - allowedValues_ = null; - } - return allowedValuesBuilder_; - } - 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.OpDef.AttrDef) - } - - // @@protoc_insertion_point(class_scope:tensorflow.OpDef.AttrDef) - private static final org.tensorflow.framework.OpDef.AttrDef DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.OpDef.AttrDef(); - } - - public static org.tensorflow.framework.OpDef.AttrDef getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public AttrDef parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new AttrDef(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.OpDef.AttrDef getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-   * Op names starting with an underscore are reserved for internal use.
-   * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9_]*".
-   * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * optional string name = 1; - * - *
-   * Op names starting with an underscore are reserved for internal use.
-   * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9_]*".
-   * 
- */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INPUT_ARG_FIELD_NUMBER = 2; - private java.util.List inputArg_; - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-   * Description of the input(s).
-   * 
- */ - public java.util.List getInputArgList() { - return inputArg_; - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-   * Description of the input(s).
-   * 
- */ - public java.util.List - getInputArgOrBuilderList() { - return inputArg_; - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-   * Description of the input(s).
-   * 
- */ - public int getInputArgCount() { - return inputArg_.size(); - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-   * Description of the input(s).
-   * 
- */ - public org.tensorflow.framework.OpDef.ArgDef getInputArg(int index) { - return inputArg_.get(index); - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-   * Description of the input(s).
-   * 
- */ - public org.tensorflow.framework.OpDef.ArgDefOrBuilder getInputArgOrBuilder( - int index) { - return inputArg_.get(index); - } - - public static final int OUTPUT_ARG_FIELD_NUMBER = 3; - private java.util.List outputArg_; - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-   * Description of the output(s).
-   * 
- */ - public java.util.List getOutputArgList() { - return outputArg_; - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-   * Description of the output(s).
-   * 
- */ - public java.util.List - getOutputArgOrBuilderList() { - return outputArg_; - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-   * Description of the output(s).
-   * 
- */ - public int getOutputArgCount() { - return outputArg_.size(); - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-   * Description of the output(s).
-   * 
- */ - public org.tensorflow.framework.OpDef.ArgDef getOutputArg(int index) { - return outputArg_.get(index); - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-   * Description of the output(s).
-   * 
- */ - public org.tensorflow.framework.OpDef.ArgDefOrBuilder getOutputArgOrBuilder( - int index) { - return outputArg_.get(index); - } - - public static final int ATTR_FIELD_NUMBER = 4; - private java.util.List attr_; - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public java.util.List getAttrList() { - return attr_; - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public java.util.List - getAttrOrBuilderList() { - return attr_; - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public int getAttrCount() { - return attr_.size(); - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public org.tensorflow.framework.OpDef.AttrDef getAttr(int index) { - return attr_.get(index); - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public org.tensorflow.framework.OpDef.AttrDefOrBuilder getAttrOrBuilder( - int index) { - return attr_.get(index); - } - - public static final int SUMMARY_FIELD_NUMBER = 5; - private volatile java.lang.Object summary_; - /** - * optional string summary = 5; - * - *
-   * One-line human-readable description of what the Op does.
-   * 
- */ - public java.lang.String getSummary() { - java.lang.Object ref = summary_; - 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(); - summary_ = s; - return s; - } - } - /** - * optional string summary = 5; - * - *
-   * One-line human-readable description of what the Op does.
-   * 
- */ - public com.google.protobuf.ByteString - getSummaryBytes() { - java.lang.Object ref = summary_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - summary_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 6; - private volatile java.lang.Object description_; - /** - * optional string description = 6; - * - *
-   * Additional, longer human-readable description of what the Op does.
-   * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - /** - * optional string description = 6; - * - *
-   * Additional, longer human-readable description of what the Op does.
-   * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IS_COMMUTATIVE_FIELD_NUMBER = 18; - private boolean isCommutative_; - /** - * optional bool is_commutative = 18; - * - *
-   * True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)
-   * 
- */ - public boolean getIsCommutative() { - return isCommutative_; - } - - public static final int IS_AGGREGATE_FIELD_NUMBER = 16; - private boolean isAggregate_; - /** - * optional bool is_aggregate = 16; - * - *
-   * If is_aggregate is true, then this operation accepts N >= 2
-   * inputs and produces 1 output all of the same type.  Should be
-   * associative and commutative, and produce output with the same
-   * shape as the input.  The optimizer may replace an aggregate op
-   * taking input from multiple devices with a tree of aggregate ops
-   * that aggregate locally within each device (and possibly within
-   * groups of nearby devices) before communicating.
-   * TODO(josh11b): Implement that optimization.
-   * 
- */ - public boolean getIsAggregate() { - return isAggregate_; - } - - public static final int IS_STATEFUL_FIELD_NUMBER = 17; - private boolean isStateful_; - /** - * optional bool is_stateful = 17; - * - *
-   * By default Ops may be moved between devices.  Stateful ops should
-   * either not be moved, or should only be moved if that state can also
-   * be moved (e.g. via some sort of save / restore).
-   * Stateful ops are guaranteed to never be optimized away by Common
-   * Subexpression Elimination (CSE).
-   * 
- */ - public boolean getIsStateful() { - return isStateful_; - } - - public static final int ALLOWS_UNINITIALIZED_INPUT_FIELD_NUMBER = 19; - private boolean allowsUninitializedInput_; - /** - * optional bool allows_uninitialized_input = 19; - * - *
-   * By default, all inputs to an Op must be initialized Tensors.  Ops
-   * that may initialize tensors for the first time should set this
-   * field to true, to allow the Op to take an uninitialized Tensor as
-   * input.
-   * 
- */ - public boolean getAllowsUninitializedInput() { - return allowsUninitializedInput_; - } - - 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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - for (int i = 0; i < inputArg_.size(); i++) { - output.writeMessage(2, inputArg_.get(i)); - } - for (int i = 0; i < outputArg_.size(); i++) { - output.writeMessage(3, outputArg_.get(i)); - } - for (int i = 0; i < attr_.size(); i++) { - output.writeMessage(4, attr_.get(i)); - } - if (!getSummaryBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, summary_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, description_); - } - if (isAggregate_ != false) { - output.writeBool(16, isAggregate_); - } - if (isStateful_ != false) { - output.writeBool(17, isStateful_); - } - if (isCommutative_ != false) { - output.writeBool(18, isCommutative_); - } - if (allowsUninitializedInput_ != false) { - output.writeBool(19, allowsUninitializedInput_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - for (int i = 0; i < inputArg_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, inputArg_.get(i)); - } - for (int i = 0; i < outputArg_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, outputArg_.get(i)); - } - for (int i = 0; i < attr_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, attr_.get(i)); - } - if (!getSummaryBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(5, summary_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(6, description_); - } - if (isAggregate_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(16, isAggregate_); - } - if (isStateful_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(17, isStateful_); - } - if (isCommutative_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(18, isCommutative_); - } - if (allowsUninitializedInput_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(19, allowsUninitializedInput_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.OpDef parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.OpDef 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.OpDef parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.OpDef parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.OpDef parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.OpDef parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.OpDef parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.OpDef parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.OpDef parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.OpDef parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.OpDef 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.OpDef} - * - *
-   * Defines an operation. A NodeDef in a GraphDef specifies an Op by
-   * using the "op" field which should match the name of a OpDef.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.OpDef) - org.tensorflow.framework.OpDefOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.OpDef.class, org.tensorflow.framework.OpDef.Builder.class); - } - - // Construct using org.tensorflow.framework.OpDef.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getInputArgFieldBuilder(); - getOutputArgFieldBuilder(); - getAttrFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - if (inputArgBuilder_ == null) { - inputArg_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - inputArgBuilder_.clear(); - } - if (outputArgBuilder_ == null) { - outputArg_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - outputArgBuilder_.clear(); - } - if (attrBuilder_ == null) { - attr_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - attrBuilder_.clear(); - } - summary_ = ""; - - description_ = ""; - - isCommutative_ = false; - - isAggregate_ = false; - - isStateful_ = false; - - allowsUninitializedInput_ = false; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpDef_descriptor; - } - - public org.tensorflow.framework.OpDef getDefaultInstanceForType() { - return org.tensorflow.framework.OpDef.getDefaultInstance(); - } - - public org.tensorflow.framework.OpDef build() { - org.tensorflow.framework.OpDef result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.OpDef buildPartial() { - org.tensorflow.framework.OpDef result = new org.tensorflow.framework.OpDef(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.name_ = name_; - if (inputArgBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - inputArg_ = java.util.Collections.unmodifiableList(inputArg_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.inputArg_ = inputArg_; - } else { - result.inputArg_ = inputArgBuilder_.build(); - } - if (outputArgBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - outputArg_ = java.util.Collections.unmodifiableList(outputArg_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.outputArg_ = outputArg_; - } else { - result.outputArg_ = outputArgBuilder_.build(); - } - if (attrBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { - attr_ = java.util.Collections.unmodifiableList(attr_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.attr_ = attr_; - } else { - result.attr_ = attrBuilder_.build(); - } - result.summary_ = summary_; - result.description_ = description_; - result.isCommutative_ = isCommutative_; - result.isAggregate_ = isAggregate_; - result.isStateful_ = isStateful_; - result.allowsUninitializedInput_ = allowsUninitializedInput_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.OpDef) { - return mergeFrom((org.tensorflow.framework.OpDef)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.OpDef other) { - if (other == org.tensorflow.framework.OpDef.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (inputArgBuilder_ == null) { - if (!other.inputArg_.isEmpty()) { - if (inputArg_.isEmpty()) { - inputArg_ = other.inputArg_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureInputArgIsMutable(); - inputArg_.addAll(other.inputArg_); - } - onChanged(); - } - } else { - if (!other.inputArg_.isEmpty()) { - if (inputArgBuilder_.isEmpty()) { - inputArgBuilder_.dispose(); - inputArgBuilder_ = null; - inputArg_ = other.inputArg_; - bitField0_ = (bitField0_ & ~0x00000002); - inputArgBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getInputArgFieldBuilder() : null; - } else { - inputArgBuilder_.addAllMessages(other.inputArg_); - } - } - } - if (outputArgBuilder_ == null) { - if (!other.outputArg_.isEmpty()) { - if (outputArg_.isEmpty()) { - outputArg_ = other.outputArg_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureOutputArgIsMutable(); - outputArg_.addAll(other.outputArg_); - } - onChanged(); - } - } else { - if (!other.outputArg_.isEmpty()) { - if (outputArgBuilder_.isEmpty()) { - outputArgBuilder_.dispose(); - outputArgBuilder_ = null; - outputArg_ = other.outputArg_; - bitField0_ = (bitField0_ & ~0x00000004); - outputArgBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getOutputArgFieldBuilder() : null; - } else { - outputArgBuilder_.addAllMessages(other.outputArg_); - } - } - } - if (attrBuilder_ == null) { - if (!other.attr_.isEmpty()) { - if (attr_.isEmpty()) { - attr_ = other.attr_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAttrIsMutable(); - attr_.addAll(other.attr_); - } - onChanged(); - } - } else { - if (!other.attr_.isEmpty()) { - if (attrBuilder_.isEmpty()) { - attrBuilder_.dispose(); - attrBuilder_ = null; - attr_ = other.attr_; - bitField0_ = (bitField0_ & ~0x00000008); - attrBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getAttrFieldBuilder() : null; - } else { - attrBuilder_.addAllMessages(other.attr_); - } - } - } - if (!other.getSummary().isEmpty()) { - summary_ = other.summary_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.getIsCommutative() != false) { - setIsCommutative(other.getIsCommutative()); - } - if (other.getIsAggregate() != false) { - setIsAggregate(other.getIsAggregate()); - } - if (other.getIsStateful() != false) { - setIsStateful(other.getIsStateful()); - } - if (other.getAllowsUninitializedInput() != false) { - setAllowsUninitializedInput(other.getAllowsUninitializedInput()); - } - 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.OpDef parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.OpDef) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-     * Op names starting with an underscore are reserved for internal use.
-     * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9_]*".
-     * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 1; - * - *
-     * Op names starting with an underscore are reserved for internal use.
-     * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9_]*".
-     * 
- */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 1; - * - *
-     * Op names starting with an underscore are reserved for internal use.
-     * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9_]*".
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * Op names starting with an underscore are reserved for internal use.
-     * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9_]*".
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * Op names starting with an underscore are reserved for internal use.
-     * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9_]*".
-     * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List inputArg_ = - java.util.Collections.emptyList(); - private void ensureInputArgIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - inputArg_ = new java.util.ArrayList(inputArg_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.OpDef.ArgDef, org.tensorflow.framework.OpDef.ArgDef.Builder, org.tensorflow.framework.OpDef.ArgDefOrBuilder> inputArgBuilder_; - - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public java.util.List getInputArgList() { - if (inputArgBuilder_ == null) { - return java.util.Collections.unmodifiableList(inputArg_); - } else { - return inputArgBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public int getInputArgCount() { - if (inputArgBuilder_ == null) { - return inputArg_.size(); - } else { - return inputArgBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public org.tensorflow.framework.OpDef.ArgDef getInputArg(int index) { - if (inputArgBuilder_ == null) { - return inputArg_.get(index); - } else { - return inputArgBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public Builder setInputArg( - int index, org.tensorflow.framework.OpDef.ArgDef value) { - if (inputArgBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputArgIsMutable(); - inputArg_.set(index, value); - onChanged(); - } else { - inputArgBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public Builder setInputArg( - int index, org.tensorflow.framework.OpDef.ArgDef.Builder builderForValue) { - if (inputArgBuilder_ == null) { - ensureInputArgIsMutable(); - inputArg_.set(index, builderForValue.build()); - onChanged(); - } else { - inputArgBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public Builder addInputArg(org.tensorflow.framework.OpDef.ArgDef value) { - if (inputArgBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputArgIsMutable(); - inputArg_.add(value); - onChanged(); - } else { - inputArgBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public Builder addInputArg( - int index, org.tensorflow.framework.OpDef.ArgDef value) { - if (inputArgBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputArgIsMutable(); - inputArg_.add(index, value); - onChanged(); - } else { - inputArgBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public Builder addInputArg( - org.tensorflow.framework.OpDef.ArgDef.Builder builderForValue) { - if (inputArgBuilder_ == null) { - ensureInputArgIsMutable(); - inputArg_.add(builderForValue.build()); - onChanged(); - } else { - inputArgBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public Builder addInputArg( - int index, org.tensorflow.framework.OpDef.ArgDef.Builder builderForValue) { - if (inputArgBuilder_ == null) { - ensureInputArgIsMutable(); - inputArg_.add(index, builderForValue.build()); - onChanged(); - } else { - inputArgBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public Builder addAllInputArg( - java.lang.Iterable values) { - if (inputArgBuilder_ == null) { - ensureInputArgIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, inputArg_); - onChanged(); - } else { - inputArgBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public Builder clearInputArg() { - if (inputArgBuilder_ == null) { - inputArg_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - inputArgBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public Builder removeInputArg(int index) { - if (inputArgBuilder_ == null) { - ensureInputArgIsMutable(); - inputArg_.remove(index); - onChanged(); - } else { - inputArgBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public org.tensorflow.framework.OpDef.ArgDef.Builder getInputArgBuilder( - int index) { - return getInputArgFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public org.tensorflow.framework.OpDef.ArgDefOrBuilder getInputArgOrBuilder( - int index) { - if (inputArgBuilder_ == null) { - return inputArg_.get(index); } else { - return inputArgBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public java.util.List - getInputArgOrBuilderList() { - if (inputArgBuilder_ != null) { - return inputArgBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(inputArg_); - } - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public org.tensorflow.framework.OpDef.ArgDef.Builder addInputArgBuilder() { - return getInputArgFieldBuilder().addBuilder( - org.tensorflow.framework.OpDef.ArgDef.getDefaultInstance()); - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public org.tensorflow.framework.OpDef.ArgDef.Builder addInputArgBuilder( - int index) { - return getInputArgFieldBuilder().addBuilder( - index, org.tensorflow.framework.OpDef.ArgDef.getDefaultInstance()); - } - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-     * Description of the input(s).
-     * 
- */ - public java.util.List - getInputArgBuilderList() { - return getInputArgFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.OpDef.ArgDef, org.tensorflow.framework.OpDef.ArgDef.Builder, org.tensorflow.framework.OpDef.ArgDefOrBuilder> - getInputArgFieldBuilder() { - if (inputArgBuilder_ == null) { - inputArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.OpDef.ArgDef, org.tensorflow.framework.OpDef.ArgDef.Builder, org.tensorflow.framework.OpDef.ArgDefOrBuilder>( - inputArg_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - inputArg_ = null; - } - return inputArgBuilder_; - } - - private java.util.List outputArg_ = - java.util.Collections.emptyList(); - private void ensureOutputArgIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - outputArg_ = new java.util.ArrayList(outputArg_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.OpDef.ArgDef, org.tensorflow.framework.OpDef.ArgDef.Builder, org.tensorflow.framework.OpDef.ArgDefOrBuilder> outputArgBuilder_; - - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public java.util.List getOutputArgList() { - if (outputArgBuilder_ == null) { - return java.util.Collections.unmodifiableList(outputArg_); - } else { - return outputArgBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public int getOutputArgCount() { - if (outputArgBuilder_ == null) { - return outputArg_.size(); - } else { - return outputArgBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public org.tensorflow.framework.OpDef.ArgDef getOutputArg(int index) { - if (outputArgBuilder_ == null) { - return outputArg_.get(index); - } else { - return outputArgBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public Builder setOutputArg( - int index, org.tensorflow.framework.OpDef.ArgDef value) { - if (outputArgBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputArgIsMutable(); - outputArg_.set(index, value); - onChanged(); - } else { - outputArgBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public Builder setOutputArg( - int index, org.tensorflow.framework.OpDef.ArgDef.Builder builderForValue) { - if (outputArgBuilder_ == null) { - ensureOutputArgIsMutable(); - outputArg_.set(index, builderForValue.build()); - onChanged(); - } else { - outputArgBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public Builder addOutputArg(org.tensorflow.framework.OpDef.ArgDef value) { - if (outputArgBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputArgIsMutable(); - outputArg_.add(value); - onChanged(); - } else { - outputArgBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public Builder addOutputArg( - int index, org.tensorflow.framework.OpDef.ArgDef value) { - if (outputArgBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputArgIsMutable(); - outputArg_.add(index, value); - onChanged(); - } else { - outputArgBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public Builder addOutputArg( - org.tensorflow.framework.OpDef.ArgDef.Builder builderForValue) { - if (outputArgBuilder_ == null) { - ensureOutputArgIsMutable(); - outputArg_.add(builderForValue.build()); - onChanged(); - } else { - outputArgBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public Builder addOutputArg( - int index, org.tensorflow.framework.OpDef.ArgDef.Builder builderForValue) { - if (outputArgBuilder_ == null) { - ensureOutputArgIsMutable(); - outputArg_.add(index, builderForValue.build()); - onChanged(); - } else { - outputArgBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public Builder addAllOutputArg( - java.lang.Iterable values) { - if (outputArgBuilder_ == null) { - ensureOutputArgIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, outputArg_); - onChanged(); - } else { - outputArgBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public Builder clearOutputArg() { - if (outputArgBuilder_ == null) { - outputArg_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - outputArgBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public Builder removeOutputArg(int index) { - if (outputArgBuilder_ == null) { - ensureOutputArgIsMutable(); - outputArg_.remove(index); - onChanged(); - } else { - outputArgBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public org.tensorflow.framework.OpDef.ArgDef.Builder getOutputArgBuilder( - int index) { - return getOutputArgFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public org.tensorflow.framework.OpDef.ArgDefOrBuilder getOutputArgOrBuilder( - int index) { - if (outputArgBuilder_ == null) { - return outputArg_.get(index); } else { - return outputArgBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public java.util.List - getOutputArgOrBuilderList() { - if (outputArgBuilder_ != null) { - return outputArgBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(outputArg_); - } - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public org.tensorflow.framework.OpDef.ArgDef.Builder addOutputArgBuilder() { - return getOutputArgFieldBuilder().addBuilder( - org.tensorflow.framework.OpDef.ArgDef.getDefaultInstance()); - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public org.tensorflow.framework.OpDef.ArgDef.Builder addOutputArgBuilder( - int index) { - return getOutputArgFieldBuilder().addBuilder( - index, org.tensorflow.framework.OpDef.ArgDef.getDefaultInstance()); - } - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-     * Description of the output(s).
-     * 
- */ - public java.util.List - getOutputArgBuilderList() { - return getOutputArgFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.OpDef.ArgDef, org.tensorflow.framework.OpDef.ArgDef.Builder, org.tensorflow.framework.OpDef.ArgDefOrBuilder> - getOutputArgFieldBuilder() { - if (outputArgBuilder_ == null) { - outputArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.OpDef.ArgDef, org.tensorflow.framework.OpDef.ArgDef.Builder, org.tensorflow.framework.OpDef.ArgDefOrBuilder>( - outputArg_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - outputArg_ = null; - } - return outputArgBuilder_; - } - - private java.util.List attr_ = - java.util.Collections.emptyList(); - private void ensureAttrIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - attr_ = new java.util.ArrayList(attr_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.OpDef.AttrDef, org.tensorflow.framework.OpDef.AttrDef.Builder, org.tensorflow.framework.OpDef.AttrDefOrBuilder> attrBuilder_; - - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public java.util.List getAttrList() { - if (attrBuilder_ == null) { - return java.util.Collections.unmodifiableList(attr_); - } else { - return attrBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public int getAttrCount() { - if (attrBuilder_ == null) { - return attr_.size(); - } else { - return attrBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public org.tensorflow.framework.OpDef.AttrDef getAttr(int index) { - if (attrBuilder_ == null) { - return attr_.get(index); - } else { - return attrBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public Builder setAttr( - int index, org.tensorflow.framework.OpDef.AttrDef value) { - if (attrBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttrIsMutable(); - attr_.set(index, value); - onChanged(); - } else { - attrBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public Builder setAttr( - int index, org.tensorflow.framework.OpDef.AttrDef.Builder builderForValue) { - if (attrBuilder_ == null) { - ensureAttrIsMutable(); - attr_.set(index, builderForValue.build()); - onChanged(); - } else { - attrBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public Builder addAttr(org.tensorflow.framework.OpDef.AttrDef value) { - if (attrBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttrIsMutable(); - attr_.add(value); - onChanged(); - } else { - attrBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public Builder addAttr( - int index, org.tensorflow.framework.OpDef.AttrDef value) { - if (attrBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttrIsMutable(); - attr_.add(index, value); - onChanged(); - } else { - attrBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public Builder addAttr( - org.tensorflow.framework.OpDef.AttrDef.Builder builderForValue) { - if (attrBuilder_ == null) { - ensureAttrIsMutable(); - attr_.add(builderForValue.build()); - onChanged(); - } else { - attrBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public Builder addAttr( - int index, org.tensorflow.framework.OpDef.AttrDef.Builder builderForValue) { - if (attrBuilder_ == null) { - ensureAttrIsMutable(); - attr_.add(index, builderForValue.build()); - onChanged(); - } else { - attrBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public Builder addAllAttr( - java.lang.Iterable values) { - if (attrBuilder_ == null) { - ensureAttrIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, attr_); - onChanged(); - } else { - attrBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public Builder clearAttr() { - if (attrBuilder_ == null) { - attr_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - attrBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public Builder removeAttr(int index) { - if (attrBuilder_ == null) { - ensureAttrIsMutable(); - attr_.remove(index); - onChanged(); - } else { - attrBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public org.tensorflow.framework.OpDef.AttrDef.Builder getAttrBuilder( - int index) { - return getAttrFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public org.tensorflow.framework.OpDef.AttrDefOrBuilder getAttrOrBuilder( - int index) { - if (attrBuilder_ == null) { - return attr_.get(index); } else { - return attrBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public java.util.List - getAttrOrBuilderList() { - if (attrBuilder_ != null) { - return attrBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(attr_); - } - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public org.tensorflow.framework.OpDef.AttrDef.Builder addAttrBuilder() { - return getAttrFieldBuilder().addBuilder( - org.tensorflow.framework.OpDef.AttrDef.getDefaultInstance()); - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public org.tensorflow.framework.OpDef.AttrDef.Builder addAttrBuilder( - int index) { - return getAttrFieldBuilder().addBuilder( - index, org.tensorflow.framework.OpDef.AttrDef.getDefaultInstance()); - } - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - public java.util.List - getAttrBuilderList() { - return getAttrFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.OpDef.AttrDef, org.tensorflow.framework.OpDef.AttrDef.Builder, org.tensorflow.framework.OpDef.AttrDefOrBuilder> - getAttrFieldBuilder() { - if (attrBuilder_ == null) { - attrBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.OpDef.AttrDef, org.tensorflow.framework.OpDef.AttrDef.Builder, org.tensorflow.framework.OpDef.AttrDefOrBuilder>( - attr_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); - attr_ = null; - } - return attrBuilder_; - } - - private java.lang.Object summary_ = ""; - /** - * optional string summary = 5; - * - *
-     * One-line human-readable description of what the Op does.
-     * 
- */ - public java.lang.String getSummary() { - java.lang.Object ref = summary_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - summary_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string summary = 5; - * - *
-     * One-line human-readable description of what the Op does.
-     * 
- */ - public com.google.protobuf.ByteString - getSummaryBytes() { - java.lang.Object ref = summary_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - summary_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string summary = 5; - * - *
-     * One-line human-readable description of what the Op does.
-     * 
- */ - public Builder setSummary( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - summary_ = value; - onChanged(); - return this; - } - /** - * optional string summary = 5; - * - *
-     * One-line human-readable description of what the Op does.
-     * 
- */ - public Builder clearSummary() { - - summary_ = getDefaultInstance().getSummary(); - onChanged(); - return this; - } - /** - * optional string summary = 5; - * - *
-     * One-line human-readable description of what the Op does.
-     * 
- */ - public Builder setSummaryBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - summary_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * optional string description = 6; - * - *
-     * Additional, longer human-readable description of what the Op does.
-     * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string description = 6; - * - *
-     * Additional, longer human-readable description of what the Op does.
-     * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string description = 6; - * - *
-     * Additional, longer human-readable description of what the Op does.
-     * 
- */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * optional string description = 6; - * - *
-     * Additional, longer human-readable description of what the Op does.
-     * 
- */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * optional string description = 6; - * - *
-     * Additional, longer human-readable description of what the Op does.
-     * 
- */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private boolean isCommutative_ ; - /** - * optional bool is_commutative = 18; - * - *
-     * True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)
-     * 
- */ - public boolean getIsCommutative() { - return isCommutative_; - } - /** - * optional bool is_commutative = 18; - * - *
-     * True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)
-     * 
- */ - public Builder setIsCommutative(boolean value) { - - isCommutative_ = value; - onChanged(); - return this; - } - /** - * optional bool is_commutative = 18; - * - *
-     * True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)
-     * 
- */ - public Builder clearIsCommutative() { - - isCommutative_ = false; - onChanged(); - return this; - } - - private boolean isAggregate_ ; - /** - * optional bool is_aggregate = 16; - * - *
-     * If is_aggregate is true, then this operation accepts N >= 2
-     * inputs and produces 1 output all of the same type.  Should be
-     * associative and commutative, and produce output with the same
-     * shape as the input.  The optimizer may replace an aggregate op
-     * taking input from multiple devices with a tree of aggregate ops
-     * that aggregate locally within each device (and possibly within
-     * groups of nearby devices) before communicating.
-     * TODO(josh11b): Implement that optimization.
-     * 
- */ - public boolean getIsAggregate() { - return isAggregate_; - } - /** - * optional bool is_aggregate = 16; - * - *
-     * If is_aggregate is true, then this operation accepts N >= 2
-     * inputs and produces 1 output all of the same type.  Should be
-     * associative and commutative, and produce output with the same
-     * shape as the input.  The optimizer may replace an aggregate op
-     * taking input from multiple devices with a tree of aggregate ops
-     * that aggregate locally within each device (and possibly within
-     * groups of nearby devices) before communicating.
-     * TODO(josh11b): Implement that optimization.
-     * 
- */ - public Builder setIsAggregate(boolean value) { - - isAggregate_ = value; - onChanged(); - return this; - } - /** - * optional bool is_aggregate = 16; - * - *
-     * If is_aggregate is true, then this operation accepts N >= 2
-     * inputs and produces 1 output all of the same type.  Should be
-     * associative and commutative, and produce output with the same
-     * shape as the input.  The optimizer may replace an aggregate op
-     * taking input from multiple devices with a tree of aggregate ops
-     * that aggregate locally within each device (and possibly within
-     * groups of nearby devices) before communicating.
-     * TODO(josh11b): Implement that optimization.
-     * 
- */ - public Builder clearIsAggregate() { - - isAggregate_ = false; - onChanged(); - return this; - } - - private boolean isStateful_ ; - /** - * optional bool is_stateful = 17; - * - *
-     * By default Ops may be moved between devices.  Stateful ops should
-     * either not be moved, or should only be moved if that state can also
-     * be moved (e.g. via some sort of save / restore).
-     * Stateful ops are guaranteed to never be optimized away by Common
-     * Subexpression Elimination (CSE).
-     * 
- */ - public boolean getIsStateful() { - return isStateful_; - } - /** - * optional bool is_stateful = 17; - * - *
-     * By default Ops may be moved between devices.  Stateful ops should
-     * either not be moved, or should only be moved if that state can also
-     * be moved (e.g. via some sort of save / restore).
-     * Stateful ops are guaranteed to never be optimized away by Common
-     * Subexpression Elimination (CSE).
-     * 
- */ - public Builder setIsStateful(boolean value) { - - isStateful_ = value; - onChanged(); - return this; - } - /** - * optional bool is_stateful = 17; - * - *
-     * By default Ops may be moved between devices.  Stateful ops should
-     * either not be moved, or should only be moved if that state can also
-     * be moved (e.g. via some sort of save / restore).
-     * Stateful ops are guaranteed to never be optimized away by Common
-     * Subexpression Elimination (CSE).
-     * 
- */ - public Builder clearIsStateful() { - - isStateful_ = false; - onChanged(); - return this; - } - - private boolean allowsUninitializedInput_ ; - /** - * optional bool allows_uninitialized_input = 19; - * - *
-     * By default, all inputs to an Op must be initialized Tensors.  Ops
-     * that may initialize tensors for the first time should set this
-     * field to true, to allow the Op to take an uninitialized Tensor as
-     * input.
-     * 
- */ - public boolean getAllowsUninitializedInput() { - return allowsUninitializedInput_; - } - /** - * optional bool allows_uninitialized_input = 19; - * - *
-     * By default, all inputs to an Op must be initialized Tensors.  Ops
-     * that may initialize tensors for the first time should set this
-     * field to true, to allow the Op to take an uninitialized Tensor as
-     * input.
-     * 
- */ - public Builder setAllowsUninitializedInput(boolean value) { - - allowsUninitializedInput_ = value; - onChanged(); - return this; - } - /** - * optional bool allows_uninitialized_input = 19; - * - *
-     * By default, all inputs to an Op must be initialized Tensors.  Ops
-     * that may initialize tensors for the first time should set this
-     * field to true, to allow the Op to take an uninitialized Tensor as
-     * input.
-     * 
- */ - public Builder clearAllowsUninitializedInput() { - - allowsUninitializedInput_ = false; - 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.OpDef) - } - - // @@protoc_insertion_point(class_scope:tensorflow.OpDef) - private static final org.tensorflow.framework.OpDef DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.OpDef(); - } - - public static org.tensorflow.framework.OpDef getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public OpDef parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new OpDef(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.OpDef getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/OpDefOrBuilder.java b/src/main/java/org/tensorflow/framework/OpDefOrBuilder.java deleted file mode 100644 index 91d72fa..0000000 --- a/src/main/java/org/tensorflow/framework/OpDefOrBuilder.java +++ /dev/null @@ -1,227 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/op_def.proto - -package org.tensorflow.framework; - -public interface OpDefOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.OpDef) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-   * Op names starting with an underscore are reserved for internal use.
-   * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9_]*".
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * Op names starting with an underscore are reserved for internal use.
-   * Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9_]*".
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-   * Description of the input(s).
-   * 
- */ - java.util.List - getInputArgList(); - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-   * Description of the input(s).
-   * 
- */ - org.tensorflow.framework.OpDef.ArgDef getInputArg(int index); - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-   * Description of the input(s).
-   * 
- */ - int getInputArgCount(); - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-   * Description of the input(s).
-   * 
- */ - java.util.List - getInputArgOrBuilderList(); - /** - * repeated .tensorflow.OpDef.ArgDef input_arg = 2; - * - *
-   * Description of the input(s).
-   * 
- */ - org.tensorflow.framework.OpDef.ArgDefOrBuilder getInputArgOrBuilder( - int index); - - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-   * Description of the output(s).
-   * 
- */ - java.util.List - getOutputArgList(); - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-   * Description of the output(s).
-   * 
- */ - org.tensorflow.framework.OpDef.ArgDef getOutputArg(int index); - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-   * Description of the output(s).
-   * 
- */ - int getOutputArgCount(); - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-   * Description of the output(s).
-   * 
- */ - java.util.List - getOutputArgOrBuilderList(); - /** - * repeated .tensorflow.OpDef.ArgDef output_arg = 3; - * - *
-   * Description of the output(s).
-   * 
- */ - org.tensorflow.framework.OpDef.ArgDefOrBuilder getOutputArgOrBuilder( - int index); - - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - java.util.List - getAttrList(); - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - org.tensorflow.framework.OpDef.AttrDef getAttr(int index); - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - int getAttrCount(); - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - java.util.List - getAttrOrBuilderList(); - /** - * repeated .tensorflow.OpDef.AttrDef attr = 4; - */ - org.tensorflow.framework.OpDef.AttrDefOrBuilder getAttrOrBuilder( - int index); - - /** - * optional string summary = 5; - * - *
-   * One-line human-readable description of what the Op does.
-   * 
- */ - java.lang.String getSummary(); - /** - * optional string summary = 5; - * - *
-   * One-line human-readable description of what the Op does.
-   * 
- */ - com.google.protobuf.ByteString - getSummaryBytes(); - - /** - * optional string description = 6; - * - *
-   * Additional, longer human-readable description of what the Op does.
-   * 
- */ - java.lang.String getDescription(); - /** - * optional string description = 6; - * - *
-   * Additional, longer human-readable description of what the Op does.
-   * 
- */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - * optional bool is_commutative = 18; - * - *
-   * True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)
-   * 
- */ - boolean getIsCommutative(); - - /** - * optional bool is_aggregate = 16; - * - *
-   * If is_aggregate is true, then this operation accepts N >= 2
-   * inputs and produces 1 output all of the same type.  Should be
-   * associative and commutative, and produce output with the same
-   * shape as the input.  The optimizer may replace an aggregate op
-   * taking input from multiple devices with a tree of aggregate ops
-   * that aggregate locally within each device (and possibly within
-   * groups of nearby devices) before communicating.
-   * TODO(josh11b): Implement that optimization.
-   * 
- */ - boolean getIsAggregate(); - - /** - * optional bool is_stateful = 17; - * - *
-   * By default Ops may be moved between devices.  Stateful ops should
-   * either not be moved, or should only be moved if that state can also
-   * be moved (e.g. via some sort of save / restore).
-   * Stateful ops are guaranteed to never be optimized away by Common
-   * Subexpression Elimination (CSE).
-   * 
- */ - boolean getIsStateful(); - - /** - * optional bool allows_uninitialized_input = 19; - * - *
-   * By default, all inputs to an Op must be initialized Tensors.  Ops
-   * that may initialize tensors for the first time should set this
-   * field to true, to allow the Op to take an uninitialized Tensor as
-   * input.
-   * 
- */ - boolean getAllowsUninitializedInput(); -} diff --git a/src/main/java/org/tensorflow/framework/OpDefProtos.java b/src/main/java/org/tensorflow/framework/OpDefProtos.java deleted file mode 100644 index 9c724a4..0000000 --- a/src/main/java/org/tensorflow/framework/OpDefProtos.java +++ /dev/null @@ -1,106 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/op_def.proto - -package org.tensorflow.framework; - -public final class OpDefProtos { - private OpDefProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_OpDef_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_OpDef_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_OpDef_ArgDef_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_OpDef_ArgDef_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_OpDef_AttrDef_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_OpDef_AttrDef_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_OpList_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_OpList_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n&tensorflow/core/framework/op_def.proto" + - "\022\ntensorflow\032*tensorflow/core/framework/" + - "attr_value.proto\032%tensorflow/core/framew" + - "ork/types.proto\"\210\005\n\005OpDef\022\014\n\004name\030\001 \001(\t\022" + - "+\n\tinput_arg\030\002 \003(\0132\030.tensorflow.OpDef.Ar" + - "gDef\022,\n\noutput_arg\030\003 \003(\0132\030.tensorflow.Op" + - "Def.ArgDef\022\'\n\004attr\030\004 \003(\0132\031.tensorflow.Op" + - "Def.AttrDef\022\017\n\007summary\030\005 \001(\t\022\023\n\013descript" + - "ion\030\006 \001(\t\022\026\n\016is_commutative\030\022 \001(\010\022\024\n\014is_" + - "aggregate\030\020 \001(\010\022\023\n\013is_stateful\030\021 \001(\010\022\"\n\032", - "allows_uninitialized_input\030\023 \001(\010\032\237\001\n\006Arg" + - "Def\022\014\n\004name\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\"" + - "\n\004type\030\003 \001(\0162\024.tensorflow.DataType\022\021\n\tty" + - "pe_attr\030\004 \001(\t\022\023\n\013number_attr\030\005 \001(\t\022\026\n\016ty" + - "pe_list_attr\030\006 \001(\t\022\016\n\006is_ref\030\020 \001(\010\032\275\001\n\007A" + - "ttrDef\022\014\n\004name\030\001 \001(\t\022\014\n\004type\030\002 \001(\t\022,\n\rde" + - "fault_value\030\003 \001(\0132\025.tensorflow.AttrValue" + - "\022\023\n\013description\030\004 \001(\t\022\023\n\013has_minimum\030\005 \001" + - "(\010\022\017\n\007minimum\030\006 \001(\003\022-\n\016allowed_values\030\007 " + - "\001(\0132\025.tensorflow.AttrValue\"\'\n\006OpList\022\035\n\002", - "op\030\001 \003(\0132\021.tensorflow.OpDefB)\n\030org.tenso" + - "rflow.frameworkB\013OpDefProtosP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - org.tensorflow.framework.AttrValueProtos.getDescriptor(), - org.tensorflow.framework.TypesProtos.getDescriptor(), - }, assigner); - internal_static_tensorflow_OpDef_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_tensorflow_OpDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_OpDef_descriptor, - new java.lang.String[] { "Name", "InputArg", "OutputArg", "Attr", "Summary", "Description", "IsCommutative", "IsAggregate", "IsStateful", "AllowsUninitializedInput", }); - internal_static_tensorflow_OpDef_ArgDef_descriptor = - internal_static_tensorflow_OpDef_descriptor.getNestedTypes().get(0); - internal_static_tensorflow_OpDef_ArgDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_OpDef_ArgDef_descriptor, - new java.lang.String[] { "Name", "Description", "Type", "TypeAttr", "NumberAttr", "TypeListAttr", "IsRef", }); - internal_static_tensorflow_OpDef_AttrDef_descriptor = - internal_static_tensorflow_OpDef_descriptor.getNestedTypes().get(1); - internal_static_tensorflow_OpDef_AttrDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_OpDef_AttrDef_descriptor, - new java.lang.String[] { "Name", "Type", "DefaultValue", "Description", "HasMinimum", "Minimum", "AllowedValues", }); - internal_static_tensorflow_OpList_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_tensorflow_OpList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_OpList_descriptor, - new java.lang.String[] { "Op", }); - org.tensorflow.framework.AttrValueProtos.getDescriptor(); - org.tensorflow.framework.TypesProtos.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/org/tensorflow/framework/OpList.java b/src/main/java/org/tensorflow/framework/OpList.java deleted file mode 100644 index d2fcf1a..0000000 --- a/src/main/java/org/tensorflow/framework/OpList.java +++ /dev/null @@ -1,663 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/op_def.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.OpList} - * - *
- * A collection of OpDefs
- * 
- */ -public final class OpList extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.OpList) - OpListOrBuilder { - // Use OpList.newBuilder() to construct. - private OpList(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private OpList() { - op_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private OpList( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - op_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - op_.add(input.readMessage(org.tensorflow.framework.OpDef.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - op_ = java.util.Collections.unmodifiableList(op_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpList_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.OpList.class, org.tensorflow.framework.OpList.Builder.class); - } - - public static final int OP_FIELD_NUMBER = 1; - private java.util.List op_; - /** - * repeated .tensorflow.OpDef op = 1; - */ - public java.util.List getOpList() { - return op_; - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public java.util.List - getOpOrBuilderList() { - return op_; - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public int getOpCount() { - return op_.size(); - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public org.tensorflow.framework.OpDef getOp(int index) { - return op_.get(index); - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public org.tensorflow.framework.OpDefOrBuilder getOpOrBuilder( - int index) { - return op_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < op_.size(); i++) { - output.writeMessage(1, op_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < op_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, op_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.OpList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.OpList 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.OpList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.OpList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.OpList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.OpList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.OpList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.OpList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.OpList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.OpList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.OpList 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.OpList} - * - *
-   * A collection of OpDefs
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.OpList) - org.tensorflow.framework.OpListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpList_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.OpList.class, org.tensorflow.framework.OpList.Builder.class); - } - - // Construct using org.tensorflow.framework.OpList.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getOpFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (opBuilder_ == null) { - op_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - opBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.OpDefProtos.internal_static_tensorflow_OpList_descriptor; - } - - public org.tensorflow.framework.OpList getDefaultInstanceForType() { - return org.tensorflow.framework.OpList.getDefaultInstance(); - } - - public org.tensorflow.framework.OpList build() { - org.tensorflow.framework.OpList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.OpList buildPartial() { - org.tensorflow.framework.OpList result = new org.tensorflow.framework.OpList(this); - int from_bitField0_ = bitField0_; - if (opBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - op_ = java.util.Collections.unmodifiableList(op_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.op_ = op_; - } else { - result.op_ = opBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.OpList) { - return mergeFrom((org.tensorflow.framework.OpList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.OpList other) { - if (other == org.tensorflow.framework.OpList.getDefaultInstance()) return this; - if (opBuilder_ == null) { - if (!other.op_.isEmpty()) { - if (op_.isEmpty()) { - op_ = other.op_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureOpIsMutable(); - op_.addAll(other.op_); - } - onChanged(); - } - } else { - if (!other.op_.isEmpty()) { - if (opBuilder_.isEmpty()) { - opBuilder_.dispose(); - opBuilder_ = null; - op_ = other.op_; - bitField0_ = (bitField0_ & ~0x00000001); - opBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getOpFieldBuilder() : null; - } else { - opBuilder_.addAllMessages(other.op_); - } - } - } - 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.OpList parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.OpList) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List op_ = - java.util.Collections.emptyList(); - private void ensureOpIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - op_ = new java.util.ArrayList(op_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.OpDef, org.tensorflow.framework.OpDef.Builder, org.tensorflow.framework.OpDefOrBuilder> opBuilder_; - - /** - * repeated .tensorflow.OpDef op = 1; - */ - public java.util.List getOpList() { - if (opBuilder_ == null) { - return java.util.Collections.unmodifiableList(op_); - } else { - return opBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public int getOpCount() { - if (opBuilder_ == null) { - return op_.size(); - } else { - return opBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public org.tensorflow.framework.OpDef getOp(int index) { - if (opBuilder_ == null) { - return op_.get(index); - } else { - return opBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public Builder setOp( - int index, org.tensorflow.framework.OpDef value) { - if (opBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOpIsMutable(); - op_.set(index, value); - onChanged(); - } else { - opBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public Builder setOp( - int index, org.tensorflow.framework.OpDef.Builder builderForValue) { - if (opBuilder_ == null) { - ensureOpIsMutable(); - op_.set(index, builderForValue.build()); - onChanged(); - } else { - opBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public Builder addOp(org.tensorflow.framework.OpDef value) { - if (opBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOpIsMutable(); - op_.add(value); - onChanged(); - } else { - opBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public Builder addOp( - int index, org.tensorflow.framework.OpDef value) { - if (opBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOpIsMutable(); - op_.add(index, value); - onChanged(); - } else { - opBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public Builder addOp( - org.tensorflow.framework.OpDef.Builder builderForValue) { - if (opBuilder_ == null) { - ensureOpIsMutable(); - op_.add(builderForValue.build()); - onChanged(); - } else { - opBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public Builder addOp( - int index, org.tensorflow.framework.OpDef.Builder builderForValue) { - if (opBuilder_ == null) { - ensureOpIsMutable(); - op_.add(index, builderForValue.build()); - onChanged(); - } else { - opBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public Builder addAllOp( - java.lang.Iterable values) { - if (opBuilder_ == null) { - ensureOpIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, op_); - onChanged(); - } else { - opBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public Builder clearOp() { - if (opBuilder_ == null) { - op_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - opBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public Builder removeOp(int index) { - if (opBuilder_ == null) { - ensureOpIsMutable(); - op_.remove(index); - onChanged(); - } else { - opBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public org.tensorflow.framework.OpDef.Builder getOpBuilder( - int index) { - return getOpFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public org.tensorflow.framework.OpDefOrBuilder getOpOrBuilder( - int index) { - if (opBuilder_ == null) { - return op_.get(index); } else { - return opBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public java.util.List - getOpOrBuilderList() { - if (opBuilder_ != null) { - return opBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(op_); - } - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public org.tensorflow.framework.OpDef.Builder addOpBuilder() { - return getOpFieldBuilder().addBuilder( - org.tensorflow.framework.OpDef.getDefaultInstance()); - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public org.tensorflow.framework.OpDef.Builder addOpBuilder( - int index) { - return getOpFieldBuilder().addBuilder( - index, org.tensorflow.framework.OpDef.getDefaultInstance()); - } - /** - * repeated .tensorflow.OpDef op = 1; - */ - public java.util.List - getOpBuilderList() { - return getOpFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.OpDef, org.tensorflow.framework.OpDef.Builder, org.tensorflow.framework.OpDefOrBuilder> - getOpFieldBuilder() { - if (opBuilder_ == null) { - opBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.OpDef, org.tensorflow.framework.OpDef.Builder, org.tensorflow.framework.OpDefOrBuilder>( - op_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - op_ = null; - } - return opBuilder_; - } - 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.OpList) - } - - // @@protoc_insertion_point(class_scope:tensorflow.OpList) - private static final org.tensorflow.framework.OpList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.OpList(); - } - - public static org.tensorflow.framework.OpList getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public OpList parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new OpList(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.OpList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/OpListOrBuilder.java b/src/main/java/org/tensorflow/framework/OpListOrBuilder.java deleted file mode 100644 index ff43744..0000000 --- a/src/main/java/org/tensorflow/framework/OpListOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/op_def.proto - -package org.tensorflow.framework; - -public interface OpListOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.OpList) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .tensorflow.OpDef op = 1; - */ - java.util.List - getOpList(); - /** - * repeated .tensorflow.OpDef op = 1; - */ - org.tensorflow.framework.OpDef getOp(int index); - /** - * repeated .tensorflow.OpDef op = 1; - */ - int getOpCount(); - /** - * repeated .tensorflow.OpDef op = 1; - */ - java.util.List - getOpOrBuilderList(); - /** - * repeated .tensorflow.OpDef op = 1; - */ - org.tensorflow.framework.OpDefOrBuilder getOpOrBuilder( - int index); -} diff --git a/src/main/java/org/tensorflow/framework/OptimizerOptions.java b/src/main/java/org/tensorflow/framework/OptimizerOptions.java deleted file mode 100644 index 223267e..0000000 --- a/src/main/java/org/tensorflow/framework/OptimizerOptions.java +++ /dev/null @@ -1,752 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/config.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.OptimizerOptions} - * - *
- * Options passed to the graph optimizer
- * 
- */ -public final class OptimizerOptions extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.OptimizerOptions) - OptimizerOptionsOrBuilder { - // Use OptimizerOptions.newBuilder() to construct. - private OptimizerOptions(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private OptimizerOptions() { - doCommonSubexpressionElimination_ = false; - doConstantFolding_ = false; - doFunctionInlining_ = false; - optLevel_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private OptimizerOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 8: { - - doCommonSubexpressionElimination_ = input.readBool(); - break; - } - case 16: { - - doConstantFolding_ = input.readBool(); - break; - } - case 24: { - int rawValue = input.readEnum(); - - optLevel_ = rawValue; - break; - } - case 32: { - - doFunctionInlining_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_OptimizerOptions_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_OptimizerOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.OptimizerOptions.class, org.tensorflow.framework.OptimizerOptions.Builder.class); - } - - /** - * Protobuf enum {@code tensorflow.OptimizerOptions.Level} - * - *
-   * Optimization level
-   * 
- */ - public enum Level - implements com.google.protobuf.ProtocolMessageEnum { - /** - * L1 = 0; - * - *
-     * L1 is the default level.
-     * Optimization performed at L1 :
-     * 1. Common subexpression elimination
-     * 
- */ - L1(0, 0), - /** - * L2 = 2; - * - *
-     * Optimization performed at L2 :
-     * 1. Common subexpression elimination
-     * 2. Constant folding
-     * 
- */ - L2(1, 2), - /** - * L0 = -1; - * - *
-     * No optimizations
-     * 
- */ - L0(2, -1), - UNRECOGNIZED(-1, -1), - ; - - /** - * L1 = 0; - * - *
-     * L1 is the default level.
-     * Optimization performed at L1 :
-     * 1. Common subexpression elimination
-     * 
- */ - public static final int L1_VALUE = 0; - /** - * L2 = 2; - * - *
-     * Optimization performed at L2 :
-     * 1. Common subexpression elimination
-     * 2. Constant folding
-     * 
- */ - public static final int L2_VALUE = 2; - /** - * L0 = -1; - * - *
-     * No optimizations
-     * 
- */ - public static final int L0_VALUE = -1; - - - public final int getNumber() { - if (index == -1) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - public static Level valueOf(int value) { - switch (value) { - case 0: return L1; - case 2: return L2; - case -1: return L0; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Level> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Level findValueByNumber(int number) { - return Level.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return org.tensorflow.framework.OptimizerOptions.getDescriptor().getEnumTypes().get(0); - } - - private static final Level[] VALUES = values(); - - public static Level valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private Level(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:tensorflow.OptimizerOptions.Level) - } - - public static final int DO_COMMON_SUBEXPRESSION_ELIMINATION_FIELD_NUMBER = 1; - private boolean doCommonSubexpressionElimination_; - /** - * optional bool do_common_subexpression_elimination = 1; - * - *
-   * If true, optimize the graph using common subexpression elimination.
-   * 
- */ - public boolean getDoCommonSubexpressionElimination() { - return doCommonSubexpressionElimination_; - } - - public static final int DO_CONSTANT_FOLDING_FIELD_NUMBER = 2; - private boolean doConstantFolding_; - /** - * optional bool do_constant_folding = 2; - * - *
-   * If true, perform constant folding optimization on the graph.
-   * 
- */ - public boolean getDoConstantFolding() { - return doConstantFolding_; - } - - public static final int DO_FUNCTION_INLINING_FIELD_NUMBER = 4; - private boolean doFunctionInlining_; - /** - * optional bool do_function_inlining = 4; - * - *
-   * If true, perform function inlining on the graph.
-   * 
- */ - public boolean getDoFunctionInlining() { - return doFunctionInlining_; - } - - public static final int OPT_LEVEL_FIELD_NUMBER = 3; - private int optLevel_; - /** - * optional .tensorflow.OptimizerOptions.Level opt_level = 3; - */ - public int getOptLevelValue() { - return optLevel_; - } - /** - * optional .tensorflow.OptimizerOptions.Level opt_level = 3; - */ - public org.tensorflow.framework.OptimizerOptions.Level getOptLevel() { - org.tensorflow.framework.OptimizerOptions.Level result = org.tensorflow.framework.OptimizerOptions.Level.valueOf(optLevel_); - return result == null ? org.tensorflow.framework.OptimizerOptions.Level.UNRECOGNIZED : result; - } - - 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 (doCommonSubexpressionElimination_ != false) { - output.writeBool(1, doCommonSubexpressionElimination_); - } - if (doConstantFolding_ != false) { - output.writeBool(2, doConstantFolding_); - } - if (optLevel_ != org.tensorflow.framework.OptimizerOptions.Level.L1.getNumber()) { - output.writeEnum(3, optLevel_); - } - if (doFunctionInlining_ != false) { - output.writeBool(4, doFunctionInlining_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (doCommonSubexpressionElimination_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, doCommonSubexpressionElimination_); - } - if (doConstantFolding_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, doConstantFolding_); - } - if (optLevel_ != org.tensorflow.framework.OptimizerOptions.Level.L1.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, optLevel_); - } - if (doFunctionInlining_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, doFunctionInlining_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.OptimizerOptions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.OptimizerOptions 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.OptimizerOptions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.OptimizerOptions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.OptimizerOptions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.OptimizerOptions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.OptimizerOptions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.OptimizerOptions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.OptimizerOptions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.OptimizerOptions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.OptimizerOptions 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.OptimizerOptions} - * - *
-   * Options passed to the graph optimizer
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.OptimizerOptions) - org.tensorflow.framework.OptimizerOptionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_OptimizerOptions_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_OptimizerOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.OptimizerOptions.class, org.tensorflow.framework.OptimizerOptions.Builder.class); - } - - // Construct using org.tensorflow.framework.OptimizerOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - doCommonSubexpressionElimination_ = false; - - doConstantFolding_ = false; - - doFunctionInlining_ = false; - - optLevel_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_OptimizerOptions_descriptor; - } - - public org.tensorflow.framework.OptimizerOptions getDefaultInstanceForType() { - return org.tensorflow.framework.OptimizerOptions.getDefaultInstance(); - } - - public org.tensorflow.framework.OptimizerOptions build() { - org.tensorflow.framework.OptimizerOptions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.OptimizerOptions buildPartial() { - org.tensorflow.framework.OptimizerOptions result = new org.tensorflow.framework.OptimizerOptions(this); - result.doCommonSubexpressionElimination_ = doCommonSubexpressionElimination_; - result.doConstantFolding_ = doConstantFolding_; - result.doFunctionInlining_ = doFunctionInlining_; - result.optLevel_ = optLevel_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.OptimizerOptions) { - return mergeFrom((org.tensorflow.framework.OptimizerOptions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.OptimizerOptions other) { - if (other == org.tensorflow.framework.OptimizerOptions.getDefaultInstance()) return this; - if (other.getDoCommonSubexpressionElimination() != false) { - setDoCommonSubexpressionElimination(other.getDoCommonSubexpressionElimination()); - } - if (other.getDoConstantFolding() != false) { - setDoConstantFolding(other.getDoConstantFolding()); - } - if (other.getDoFunctionInlining() != false) { - setDoFunctionInlining(other.getDoFunctionInlining()); - } - if (other.optLevel_ != 0) { - setOptLevelValue(other.getOptLevelValue()); - } - 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.OptimizerOptions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.OptimizerOptions) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private boolean doCommonSubexpressionElimination_ ; - /** - * optional bool do_common_subexpression_elimination = 1; - * - *
-     * If true, optimize the graph using common subexpression elimination.
-     * 
- */ - public boolean getDoCommonSubexpressionElimination() { - return doCommonSubexpressionElimination_; - } - /** - * optional bool do_common_subexpression_elimination = 1; - * - *
-     * If true, optimize the graph using common subexpression elimination.
-     * 
- */ - public Builder setDoCommonSubexpressionElimination(boolean value) { - - doCommonSubexpressionElimination_ = value; - onChanged(); - return this; - } - /** - * optional bool do_common_subexpression_elimination = 1; - * - *
-     * If true, optimize the graph using common subexpression elimination.
-     * 
- */ - public Builder clearDoCommonSubexpressionElimination() { - - doCommonSubexpressionElimination_ = false; - onChanged(); - return this; - } - - private boolean doConstantFolding_ ; - /** - * optional bool do_constant_folding = 2; - * - *
-     * If true, perform constant folding optimization on the graph.
-     * 
- */ - public boolean getDoConstantFolding() { - return doConstantFolding_; - } - /** - * optional bool do_constant_folding = 2; - * - *
-     * If true, perform constant folding optimization on the graph.
-     * 
- */ - public Builder setDoConstantFolding(boolean value) { - - doConstantFolding_ = value; - onChanged(); - return this; - } - /** - * optional bool do_constant_folding = 2; - * - *
-     * If true, perform constant folding optimization on the graph.
-     * 
- */ - public Builder clearDoConstantFolding() { - - doConstantFolding_ = false; - onChanged(); - return this; - } - - private boolean doFunctionInlining_ ; - /** - * optional bool do_function_inlining = 4; - * - *
-     * If true, perform function inlining on the graph.
-     * 
- */ - public boolean getDoFunctionInlining() { - return doFunctionInlining_; - } - /** - * optional bool do_function_inlining = 4; - * - *
-     * If true, perform function inlining on the graph.
-     * 
- */ - public Builder setDoFunctionInlining(boolean value) { - - doFunctionInlining_ = value; - onChanged(); - return this; - } - /** - * optional bool do_function_inlining = 4; - * - *
-     * If true, perform function inlining on the graph.
-     * 
- */ - public Builder clearDoFunctionInlining() { - - doFunctionInlining_ = false; - onChanged(); - return this; - } - - private int optLevel_ = 0; - /** - * optional .tensorflow.OptimizerOptions.Level opt_level = 3; - */ - public int getOptLevelValue() { - return optLevel_; - } - /** - * optional .tensorflow.OptimizerOptions.Level opt_level = 3; - */ - public Builder setOptLevelValue(int value) { - optLevel_ = value; - onChanged(); - return this; - } - /** - * optional .tensorflow.OptimizerOptions.Level opt_level = 3; - */ - public org.tensorflow.framework.OptimizerOptions.Level getOptLevel() { - org.tensorflow.framework.OptimizerOptions.Level result = org.tensorflow.framework.OptimizerOptions.Level.valueOf(optLevel_); - return result == null ? org.tensorflow.framework.OptimizerOptions.Level.UNRECOGNIZED : result; - } - /** - * optional .tensorflow.OptimizerOptions.Level opt_level = 3; - */ - public Builder setOptLevel(org.tensorflow.framework.OptimizerOptions.Level value) { - if (value == null) { - throw new NullPointerException(); - } - - optLevel_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .tensorflow.OptimizerOptions.Level opt_level = 3; - */ - public Builder clearOptLevel() { - - optLevel_ = 0; - 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.OptimizerOptions) - } - - // @@protoc_insertion_point(class_scope:tensorflow.OptimizerOptions) - private static final org.tensorflow.framework.OptimizerOptions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.OptimizerOptions(); - } - - public static org.tensorflow.framework.OptimizerOptions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public OptimizerOptions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new OptimizerOptions(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.OptimizerOptions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/OptimizerOptionsOrBuilder.java b/src/main/java/org/tensorflow/framework/OptimizerOptionsOrBuilder.java deleted file mode 100644 index d877e97..0000000 --- a/src/main/java/org/tensorflow/framework/OptimizerOptionsOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/config.proto - -package org.tensorflow.framework; - -public interface OptimizerOptionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.OptimizerOptions) - com.google.protobuf.MessageOrBuilder { - - /** - * optional bool do_common_subexpression_elimination = 1; - * - *
-   * If true, optimize the graph using common subexpression elimination.
-   * 
- */ - boolean getDoCommonSubexpressionElimination(); - - /** - * optional bool do_constant_folding = 2; - * - *
-   * If true, perform constant folding optimization on the graph.
-   * 
- */ - boolean getDoConstantFolding(); - - /** - * optional bool do_function_inlining = 4; - * - *
-   * If true, perform function inlining on the graph.
-   * 
- */ - boolean getDoFunctionInlining(); - - /** - * optional .tensorflow.OptimizerOptions.Level opt_level = 3; - */ - int getOptLevelValue(); - /** - * optional .tensorflow.OptimizerOptions.Level opt_level = 3; - */ - org.tensorflow.framework.OptimizerOptions.Level getOptLevel(); -} diff --git a/src/main/java/org/tensorflow/framework/SaveSliceInfoDef.java b/src/main/java/org/tensorflow/framework/SaveSliceInfoDef.java deleted file mode 100644 index 2f9e97e..0000000 --- a/src/main/java/org/tensorflow/framework/SaveSliceInfoDef.java +++ /dev/null @@ -1,1050 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/variable.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.SaveSliceInfoDef} - */ -public final class SaveSliceInfoDef extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.SaveSliceInfoDef) - SaveSliceInfoDefOrBuilder { - // Use SaveSliceInfoDef.newBuilder() to construct. - private SaveSliceInfoDef(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private SaveSliceInfoDef() { - fullName_ = ""; - fullShape_ = java.util.Collections.emptyList(); - varOffset_ = java.util.Collections.emptyList(); - varShape_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private SaveSliceInfoDef( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - String s = input.readStringRequireUtf8(); - - fullName_ = s; - break; - } - case 16: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - fullShape_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - fullShape_.add(input.readInt32()); - break; - } - case 18: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) { - fullShape_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - fullShape_.add(input.readInt32()); - } - input.popLimit(limit); - break; - } - case 24: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - varOffset_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - varOffset_.add(input.readInt32()); - break; - } - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) { - varOffset_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - while (input.getBytesUntilLimit() > 0) { - varOffset_.add(input.readInt32()); - } - input.popLimit(limit); - break; - } - case 32: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - varShape_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - varShape_.add(input.readInt32()); - break; - } - case 34: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) { - varShape_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - while (input.getBytesUntilLimit() > 0) { - varShape_.add(input.readInt32()); - } - input.popLimit(limit); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - fullShape_ = java.util.Collections.unmodifiableList(fullShape_); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - varOffset_ = java.util.Collections.unmodifiableList(varOffset_); - } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - varShape_ = java.util.Collections.unmodifiableList(varShape_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.SaveSliceInfoDef.class, org.tensorflow.framework.SaveSliceInfoDef.Builder.class); - } - - private int bitField0_; - public static final int FULL_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object fullName_; - /** - * optional string full_name = 1; - * - *
-   * Name of the full variable of which this is a slice.
-   * 
- */ - public java.lang.String getFullName() { - java.lang.Object ref = fullName_; - 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(); - fullName_ = s; - return s; - } - } - /** - * optional string full_name = 1; - * - *
-   * Name of the full variable of which this is a slice.
-   * 
- */ - public com.google.protobuf.ByteString - getFullNameBytes() { - java.lang.Object ref = fullName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FULL_SHAPE_FIELD_NUMBER = 2; - private java.util.List fullShape_; - /** - * repeated int32 full_shape = 2; - * - *
-   * Shape of the full variable.
-   * 
- */ - public java.util.List - getFullShapeList() { - return fullShape_; - } - /** - * repeated int32 full_shape = 2; - * - *
-   * Shape of the full variable.
-   * 
- */ - public int getFullShapeCount() { - return fullShape_.size(); - } - /** - * repeated int32 full_shape = 2; - * - *
-   * Shape of the full variable.
-   * 
- */ - public int getFullShape(int index) { - return fullShape_.get(index); - } - private int fullShapeMemoizedSerializedSize = -1; - - public static final int VAR_OFFSET_FIELD_NUMBER = 3; - private java.util.List varOffset_; - /** - * repeated int32 var_offset = 3; - * - *
-   * Offset of this variable into the full variable.
-   * 
- */ - public java.util.List - getVarOffsetList() { - return varOffset_; - } - /** - * repeated int32 var_offset = 3; - * - *
-   * Offset of this variable into the full variable.
-   * 
- */ - public int getVarOffsetCount() { - return varOffset_.size(); - } - /** - * repeated int32 var_offset = 3; - * - *
-   * Offset of this variable into the full variable.
-   * 
- */ - public int getVarOffset(int index) { - return varOffset_.get(index); - } - private int varOffsetMemoizedSerializedSize = -1; - - public static final int VAR_SHAPE_FIELD_NUMBER = 4; - private java.util.List varShape_; - /** - * repeated int32 var_shape = 4; - * - *
-   * Shape of this variable.
-   * 
- */ - public java.util.List - getVarShapeList() { - return varShape_; - } - /** - * repeated int32 var_shape = 4; - * - *
-   * Shape of this variable.
-   * 
- */ - public int getVarShapeCount() { - return varShape_.size(); - } - /** - * repeated int32 var_shape = 4; - * - *
-   * Shape of this variable.
-   * 
- */ - public int getVarShape(int index) { - return varShape_.get(index); - } - private int varShapeMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (!getFullNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, fullName_); - } - if (getFullShapeList().size() > 0) { - output.writeRawVarint32(18); - output.writeRawVarint32(fullShapeMemoizedSerializedSize); - } - for (int i = 0; i < fullShape_.size(); i++) { - output.writeInt32NoTag(fullShape_.get(i)); - } - if (getVarOffsetList().size() > 0) { - output.writeRawVarint32(26); - output.writeRawVarint32(varOffsetMemoizedSerializedSize); - } - for (int i = 0; i < varOffset_.size(); i++) { - output.writeInt32NoTag(varOffset_.get(i)); - } - if (getVarShapeList().size() > 0) { - output.writeRawVarint32(34); - output.writeRawVarint32(varShapeMemoizedSerializedSize); - } - for (int i = 0; i < varShape_.size(); i++) { - output.writeInt32NoTag(varShape_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getFullNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, fullName_); - } - { - int dataSize = 0; - for (int i = 0; i < fullShape_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(fullShape_.get(i)); - } - size += dataSize; - if (!getFullShapeList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - fullShapeMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < varOffset_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(varOffset_.get(i)); - } - size += dataSize; - if (!getVarOffsetList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - varOffsetMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < varShape_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(varShape_.get(i)); - } - size += dataSize; - if (!getVarShapeList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - varShapeMemoizedSerializedSize = dataSize; - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.SaveSliceInfoDef parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.SaveSliceInfoDef 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.SaveSliceInfoDef parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.SaveSliceInfoDef parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.SaveSliceInfoDef parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.SaveSliceInfoDef parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.SaveSliceInfoDef parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.SaveSliceInfoDef parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.SaveSliceInfoDef parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.SaveSliceInfoDef parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.SaveSliceInfoDef 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.SaveSliceInfoDef} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.SaveSliceInfoDef) - org.tensorflow.framework.SaveSliceInfoDefOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.SaveSliceInfoDef.class, org.tensorflow.framework.SaveSliceInfoDef.Builder.class); - } - - // Construct using org.tensorflow.framework.SaveSliceInfoDef.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - fullName_ = ""; - - fullShape_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - varOffset_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - varShape_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_descriptor; - } - - public org.tensorflow.framework.SaveSliceInfoDef getDefaultInstanceForType() { - return org.tensorflow.framework.SaveSliceInfoDef.getDefaultInstance(); - } - - public org.tensorflow.framework.SaveSliceInfoDef build() { - org.tensorflow.framework.SaveSliceInfoDef result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.SaveSliceInfoDef buildPartial() { - org.tensorflow.framework.SaveSliceInfoDef result = new org.tensorflow.framework.SaveSliceInfoDef(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.fullName_ = fullName_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - fullShape_ = java.util.Collections.unmodifiableList(fullShape_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.fullShape_ = fullShape_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - varOffset_ = java.util.Collections.unmodifiableList(varOffset_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.varOffset_ = varOffset_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - varShape_ = java.util.Collections.unmodifiableList(varShape_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.varShape_ = varShape_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.SaveSliceInfoDef) { - return mergeFrom((org.tensorflow.framework.SaveSliceInfoDef)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.SaveSliceInfoDef other) { - if (other == org.tensorflow.framework.SaveSliceInfoDef.getDefaultInstance()) return this; - if (!other.getFullName().isEmpty()) { - fullName_ = other.fullName_; - onChanged(); - } - if (!other.fullShape_.isEmpty()) { - if (fullShape_.isEmpty()) { - fullShape_ = other.fullShape_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureFullShapeIsMutable(); - fullShape_.addAll(other.fullShape_); - } - onChanged(); - } - if (!other.varOffset_.isEmpty()) { - if (varOffset_.isEmpty()) { - varOffset_ = other.varOffset_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureVarOffsetIsMutable(); - varOffset_.addAll(other.varOffset_); - } - onChanged(); - } - if (!other.varShape_.isEmpty()) { - if (varShape_.isEmpty()) { - varShape_ = other.varShape_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureVarShapeIsMutable(); - varShape_.addAll(other.varShape_); - } - 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.SaveSliceInfoDef parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.SaveSliceInfoDef) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object fullName_ = ""; - /** - * optional string full_name = 1; - * - *
-     * Name of the full variable of which this is a slice.
-     * 
- */ - public java.lang.String getFullName() { - java.lang.Object ref = fullName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string full_name = 1; - * - *
-     * Name of the full variable of which this is a slice.
-     * 
- */ - public com.google.protobuf.ByteString - getFullNameBytes() { - java.lang.Object ref = fullName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string full_name = 1; - * - *
-     * Name of the full variable of which this is a slice.
-     * 
- */ - public Builder setFullName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - fullName_ = value; - onChanged(); - return this; - } - /** - * optional string full_name = 1; - * - *
-     * Name of the full variable of which this is a slice.
-     * 
- */ - public Builder clearFullName() { - - fullName_ = getDefaultInstance().getFullName(); - onChanged(); - return this; - } - /** - * optional string full_name = 1; - * - *
-     * Name of the full variable of which this is a slice.
-     * 
- */ - public Builder setFullNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - fullName_ = value; - onChanged(); - return this; - } - - private java.util.List fullShape_ = java.util.Collections.emptyList(); - private void ensureFullShapeIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - fullShape_ = new java.util.ArrayList(fullShape_); - bitField0_ |= 0x00000002; - } - } - /** - * repeated int32 full_shape = 2; - * - *
-     * Shape of the full variable.
-     * 
- */ - public java.util.List - getFullShapeList() { - return java.util.Collections.unmodifiableList(fullShape_); - } - /** - * repeated int32 full_shape = 2; - * - *
-     * Shape of the full variable.
-     * 
- */ - public int getFullShapeCount() { - return fullShape_.size(); - } - /** - * repeated int32 full_shape = 2; - * - *
-     * Shape of the full variable.
-     * 
- */ - public int getFullShape(int index) { - return fullShape_.get(index); - } - /** - * repeated int32 full_shape = 2; - * - *
-     * Shape of the full variable.
-     * 
- */ - public Builder setFullShape( - int index, int value) { - ensureFullShapeIsMutable(); - fullShape_.set(index, value); - onChanged(); - return this; - } - /** - * repeated int32 full_shape = 2; - * - *
-     * Shape of the full variable.
-     * 
- */ - public Builder addFullShape(int value) { - ensureFullShapeIsMutable(); - fullShape_.add(value); - onChanged(); - return this; - } - /** - * repeated int32 full_shape = 2; - * - *
-     * Shape of the full variable.
-     * 
- */ - public Builder addAllFullShape( - java.lang.Iterable values) { - ensureFullShapeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fullShape_); - onChanged(); - return this; - } - /** - * repeated int32 full_shape = 2; - * - *
-     * Shape of the full variable.
-     * 
- */ - public Builder clearFullShape() { - fullShape_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - private java.util.List varOffset_ = java.util.Collections.emptyList(); - private void ensureVarOffsetIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - varOffset_ = new java.util.ArrayList(varOffset_); - bitField0_ |= 0x00000004; - } - } - /** - * repeated int32 var_offset = 3; - * - *
-     * Offset of this variable into the full variable.
-     * 
- */ - public java.util.List - getVarOffsetList() { - return java.util.Collections.unmodifiableList(varOffset_); - } - /** - * repeated int32 var_offset = 3; - * - *
-     * Offset of this variable into the full variable.
-     * 
- */ - public int getVarOffsetCount() { - return varOffset_.size(); - } - /** - * repeated int32 var_offset = 3; - * - *
-     * Offset of this variable into the full variable.
-     * 
- */ - public int getVarOffset(int index) { - return varOffset_.get(index); - } - /** - * repeated int32 var_offset = 3; - * - *
-     * Offset of this variable into the full variable.
-     * 
- */ - public Builder setVarOffset( - int index, int value) { - ensureVarOffsetIsMutable(); - varOffset_.set(index, value); - onChanged(); - return this; - } - /** - * repeated int32 var_offset = 3; - * - *
-     * Offset of this variable into the full variable.
-     * 
- */ - public Builder addVarOffset(int value) { - ensureVarOffsetIsMutable(); - varOffset_.add(value); - onChanged(); - return this; - } - /** - * repeated int32 var_offset = 3; - * - *
-     * Offset of this variable into the full variable.
-     * 
- */ - public Builder addAllVarOffset( - java.lang.Iterable values) { - ensureVarOffsetIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, varOffset_); - onChanged(); - return this; - } - /** - * repeated int32 var_offset = 3; - * - *
-     * Offset of this variable into the full variable.
-     * 
- */ - public Builder clearVarOffset() { - varOffset_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - private java.util.List varShape_ = java.util.Collections.emptyList(); - private void ensureVarShapeIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - varShape_ = new java.util.ArrayList(varShape_); - bitField0_ |= 0x00000008; - } - } - /** - * repeated int32 var_shape = 4; - * - *
-     * Shape of this variable.
-     * 
- */ - public java.util.List - getVarShapeList() { - return java.util.Collections.unmodifiableList(varShape_); - } - /** - * repeated int32 var_shape = 4; - * - *
-     * Shape of this variable.
-     * 
- */ - public int getVarShapeCount() { - return varShape_.size(); - } - /** - * repeated int32 var_shape = 4; - * - *
-     * Shape of this variable.
-     * 
- */ - public int getVarShape(int index) { - return varShape_.get(index); - } - /** - * repeated int32 var_shape = 4; - * - *
-     * Shape of this variable.
-     * 
- */ - public Builder setVarShape( - int index, int value) { - ensureVarShapeIsMutable(); - varShape_.set(index, value); - onChanged(); - return this; - } - /** - * repeated int32 var_shape = 4; - * - *
-     * Shape of this variable.
-     * 
- */ - public Builder addVarShape(int value) { - ensureVarShapeIsMutable(); - varShape_.add(value); - onChanged(); - return this; - } - /** - * repeated int32 var_shape = 4; - * - *
-     * Shape of this variable.
-     * 
- */ - public Builder addAllVarShape( - java.lang.Iterable values) { - ensureVarShapeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, varShape_); - onChanged(); - return this; - } - /** - * repeated int32 var_shape = 4; - * - *
-     * Shape of this variable.
-     * 
- */ - public Builder clearVarShape() { - varShape_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - 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.SaveSliceInfoDef) - } - - // @@protoc_insertion_point(class_scope:tensorflow.SaveSliceInfoDef) - private static final org.tensorflow.framework.SaveSliceInfoDef DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.SaveSliceInfoDef(); - } - - public static org.tensorflow.framework.SaveSliceInfoDef getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public SaveSliceInfoDef parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new SaveSliceInfoDef(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.SaveSliceInfoDef getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/SaveSliceInfoDefOrBuilder.java b/src/main/java/org/tensorflow/framework/SaveSliceInfoDefOrBuilder.java deleted file mode 100644 index 7249776..0000000 --- a/src/main/java/org/tensorflow/framework/SaveSliceInfoDefOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/variable.proto - -package org.tensorflow.framework; - -public interface SaveSliceInfoDefOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.SaveSliceInfoDef) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string full_name = 1; - * - *
-   * Name of the full variable of which this is a slice.
-   * 
- */ - java.lang.String getFullName(); - /** - * optional string full_name = 1; - * - *
-   * Name of the full variable of which this is a slice.
-   * 
- */ - com.google.protobuf.ByteString - getFullNameBytes(); - - /** - * repeated int32 full_shape = 2; - * - *
-   * Shape of the full variable.
-   * 
- */ - java.util.List getFullShapeList(); - /** - * repeated int32 full_shape = 2; - * - *
-   * Shape of the full variable.
-   * 
- */ - int getFullShapeCount(); - /** - * repeated int32 full_shape = 2; - * - *
-   * Shape of the full variable.
-   * 
- */ - int getFullShape(int index); - - /** - * repeated int32 var_offset = 3; - * - *
-   * Offset of this variable into the full variable.
-   * 
- */ - java.util.List getVarOffsetList(); - /** - * repeated int32 var_offset = 3; - * - *
-   * Offset of this variable into the full variable.
-   * 
- */ - int getVarOffsetCount(); - /** - * repeated int32 var_offset = 3; - * - *
-   * Offset of this variable into the full variable.
-   * 
- */ - int getVarOffset(int index); - - /** - * repeated int32 var_shape = 4; - * - *
-   * Shape of this variable.
-   * 
- */ - java.util.List getVarShapeList(); - /** - * repeated int32 var_shape = 4; - * - *
-   * Shape of this variable.
-   * 
- */ - int getVarShapeCount(); - /** - * repeated int32 var_shape = 4; - * - *
-   * Shape of this variable.
-   * 
- */ - int getVarShape(int index); -} diff --git a/src/main/java/org/tensorflow/framework/StepStats.java b/src/main/java/org/tensorflow/framework/StepStats.java deleted file mode 100644 index f4e9b7a..0000000 --- a/src/main/java/org/tensorflow/framework/StepStats.java +++ /dev/null @@ -1,655 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/step_stats.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.StepStats} - */ -public final class StepStats extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.StepStats) - StepStatsOrBuilder { - // Use StepStats.newBuilder() to construct. - private StepStats(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private StepStats() { - devStats_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private StepStats( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - devStats_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - devStats_.add(input.readMessage(org.tensorflow.framework.DeviceStepStats.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - devStats_ = java.util.Collections.unmodifiableList(devStats_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_StepStats_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_StepStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.StepStats.class, org.tensorflow.framework.StepStats.Builder.class); - } - - public static final int DEV_STATS_FIELD_NUMBER = 1; - private java.util.List devStats_; - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public java.util.List getDevStatsList() { - return devStats_; - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public java.util.List - getDevStatsOrBuilderList() { - return devStats_; - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public int getDevStatsCount() { - return devStats_.size(); - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public org.tensorflow.framework.DeviceStepStats getDevStats(int index) { - return devStats_.get(index); - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public org.tensorflow.framework.DeviceStepStatsOrBuilder getDevStatsOrBuilder( - int index) { - return devStats_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < devStats_.size(); i++) { - output.writeMessage(1, devStats_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < devStats_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, devStats_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.StepStats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.StepStats 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.StepStats parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.StepStats parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.StepStats parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.StepStats parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.StepStats parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.StepStats parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.StepStats parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.StepStats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.StepStats 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.StepStats} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.StepStats) - org.tensorflow.framework.StepStatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_StepStats_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_StepStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.StepStats.class, org.tensorflow.framework.StepStats.Builder.class); - } - - // Construct using org.tensorflow.framework.StepStats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getDevStatsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (devStatsBuilder_ == null) { - devStats_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - devStatsBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_StepStats_descriptor; - } - - public org.tensorflow.framework.StepStats getDefaultInstanceForType() { - return org.tensorflow.framework.StepStats.getDefaultInstance(); - } - - public org.tensorflow.framework.StepStats build() { - org.tensorflow.framework.StepStats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.StepStats buildPartial() { - org.tensorflow.framework.StepStats result = new org.tensorflow.framework.StepStats(this); - int from_bitField0_ = bitField0_; - if (devStatsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - devStats_ = java.util.Collections.unmodifiableList(devStats_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.devStats_ = devStats_; - } else { - result.devStats_ = devStatsBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.StepStats) { - return mergeFrom((org.tensorflow.framework.StepStats)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.StepStats other) { - if (other == org.tensorflow.framework.StepStats.getDefaultInstance()) return this; - if (devStatsBuilder_ == null) { - if (!other.devStats_.isEmpty()) { - if (devStats_.isEmpty()) { - devStats_ = other.devStats_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDevStatsIsMutable(); - devStats_.addAll(other.devStats_); - } - onChanged(); - } - } else { - if (!other.devStats_.isEmpty()) { - if (devStatsBuilder_.isEmpty()) { - devStatsBuilder_.dispose(); - devStatsBuilder_ = null; - devStats_ = other.devStats_; - bitField0_ = (bitField0_ & ~0x00000001); - devStatsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getDevStatsFieldBuilder() : null; - } else { - devStatsBuilder_.addAllMessages(other.devStats_); - } - } - } - 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.StepStats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.StepStats) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List devStats_ = - java.util.Collections.emptyList(); - private void ensureDevStatsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - devStats_ = new java.util.ArrayList(devStats_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.DeviceStepStats, org.tensorflow.framework.DeviceStepStats.Builder, org.tensorflow.framework.DeviceStepStatsOrBuilder> devStatsBuilder_; - - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public java.util.List getDevStatsList() { - if (devStatsBuilder_ == null) { - return java.util.Collections.unmodifiableList(devStats_); - } else { - return devStatsBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public int getDevStatsCount() { - if (devStatsBuilder_ == null) { - return devStats_.size(); - } else { - return devStatsBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public org.tensorflow.framework.DeviceStepStats getDevStats(int index) { - if (devStatsBuilder_ == null) { - return devStats_.get(index); - } else { - return devStatsBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public Builder setDevStats( - int index, org.tensorflow.framework.DeviceStepStats value) { - if (devStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevStatsIsMutable(); - devStats_.set(index, value); - onChanged(); - } else { - devStatsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public Builder setDevStats( - int index, org.tensorflow.framework.DeviceStepStats.Builder builderForValue) { - if (devStatsBuilder_ == null) { - ensureDevStatsIsMutable(); - devStats_.set(index, builderForValue.build()); - onChanged(); - } else { - devStatsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public Builder addDevStats(org.tensorflow.framework.DeviceStepStats value) { - if (devStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevStatsIsMutable(); - devStats_.add(value); - onChanged(); - } else { - devStatsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public Builder addDevStats( - int index, org.tensorflow.framework.DeviceStepStats value) { - if (devStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevStatsIsMutable(); - devStats_.add(index, value); - onChanged(); - } else { - devStatsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public Builder addDevStats( - org.tensorflow.framework.DeviceStepStats.Builder builderForValue) { - if (devStatsBuilder_ == null) { - ensureDevStatsIsMutable(); - devStats_.add(builderForValue.build()); - onChanged(); - } else { - devStatsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public Builder addDevStats( - int index, org.tensorflow.framework.DeviceStepStats.Builder builderForValue) { - if (devStatsBuilder_ == null) { - ensureDevStatsIsMutable(); - devStats_.add(index, builderForValue.build()); - onChanged(); - } else { - devStatsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public Builder addAllDevStats( - java.lang.Iterable values) { - if (devStatsBuilder_ == null) { - ensureDevStatsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, devStats_); - onChanged(); - } else { - devStatsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public Builder clearDevStats() { - if (devStatsBuilder_ == null) { - devStats_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - devStatsBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public Builder removeDevStats(int index) { - if (devStatsBuilder_ == null) { - ensureDevStatsIsMutable(); - devStats_.remove(index); - onChanged(); - } else { - devStatsBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public org.tensorflow.framework.DeviceStepStats.Builder getDevStatsBuilder( - int index) { - return getDevStatsFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public org.tensorflow.framework.DeviceStepStatsOrBuilder getDevStatsOrBuilder( - int index) { - if (devStatsBuilder_ == null) { - return devStats_.get(index); } else { - return devStatsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public java.util.List - getDevStatsOrBuilderList() { - if (devStatsBuilder_ != null) { - return devStatsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(devStats_); - } - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public org.tensorflow.framework.DeviceStepStats.Builder addDevStatsBuilder() { - return getDevStatsFieldBuilder().addBuilder( - org.tensorflow.framework.DeviceStepStats.getDefaultInstance()); - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public org.tensorflow.framework.DeviceStepStats.Builder addDevStatsBuilder( - int index) { - return getDevStatsFieldBuilder().addBuilder( - index, org.tensorflow.framework.DeviceStepStats.getDefaultInstance()); - } - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - public java.util.List - getDevStatsBuilderList() { - return getDevStatsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.DeviceStepStats, org.tensorflow.framework.DeviceStepStats.Builder, org.tensorflow.framework.DeviceStepStatsOrBuilder> - getDevStatsFieldBuilder() { - if (devStatsBuilder_ == null) { - devStatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.DeviceStepStats, org.tensorflow.framework.DeviceStepStats.Builder, org.tensorflow.framework.DeviceStepStatsOrBuilder>( - devStats_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - devStats_ = null; - } - return devStatsBuilder_; - } - 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.StepStats) - } - - // @@protoc_insertion_point(class_scope:tensorflow.StepStats) - private static final org.tensorflow.framework.StepStats DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.StepStats(); - } - - public static org.tensorflow.framework.StepStats getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public StepStats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new StepStats(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.StepStats getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/StepStatsOrBuilder.java b/src/main/java/org/tensorflow/framework/StepStatsOrBuilder.java deleted file mode 100644 index 59de9a5..0000000 --- a/src/main/java/org/tensorflow/framework/StepStatsOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/step_stats.proto - -package org.tensorflow.framework; - -public interface StepStatsOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.StepStats) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - java.util.List - getDevStatsList(); - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - org.tensorflow.framework.DeviceStepStats getDevStats(int index); - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - int getDevStatsCount(); - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - java.util.List - getDevStatsOrBuilderList(); - /** - * repeated .tensorflow.DeviceStepStats dev_stats = 1; - */ - org.tensorflow.framework.DeviceStepStatsOrBuilder getDevStatsOrBuilder( - int index); -} diff --git a/src/main/java/org/tensorflow/framework/StepStatsProtos.java b/src/main/java/org/tensorflow/framework/StepStatsProtos.java deleted file mode 100644 index 9c27232..0000000 --- a/src/main/java/org/tensorflow/framework/StepStatsProtos.java +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/step_stats.proto - -package org.tensorflow.framework; - -public final class StepStatsProtos { - private StepStatsProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_AllocatorMemoryUsed_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_AllocatorMemoryUsed_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_NodeOutput_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_NodeOutput_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_NodeExecStats_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_NodeExecStats_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_DeviceStepStats_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_DeviceStepStats_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_StepStats_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_StepStats_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n*tensorflow/core/framework/step_stats.p" + - "roto\022\ntensorflow\0326tensorflow/core/framew" + - "ork/allocation_description.proto\0322tensor" + - "flow/core/framework/tensor_description.p" + - "roto\"V\n\023AllocatorMemoryUsed\022\026\n\016allocator" + - "_name\030\001 \001(\t\022\023\n\013total_bytes\030\002 \001(\003\022\022\n\npeak" + - "_bytes\030\003 \001(\003\"U\n\nNodeOutput\022\014\n\004slot\030\001 \001(\005" + - "\0229\n\022tensor_description\030\003 \001(\0132\035.tensorflo" + - "w.TensorDescription\"\354\002\n\rNodeExecStats\022\021\n" + - "\tnode_name\030\001 \001(\t\022\030\n\020all_start_micros\030\002 \001", - "(\003\022\033\n\023op_start_rel_micros\030\003 \001(\003\022\031\n\021op_en" + - "d_rel_micros\030\004 \001(\003\022\032\n\022all_end_rel_micros" + - "\030\005 \001(\003\022/\n\006memory\030\006 \003(\0132\037.tensorflow.Allo" + - "catorMemoryUsed\022&\n\006output\030\007 \003(\0132\026.tensor" + - "flow.NodeOutput\022\026\n\016timeline_label\030\010 \001(\t\022" + - "\030\n\020scheduled_micros\030\t \001(\003\022\021\n\tthread_id\030\n" + - " \001(\r\022<\n\021referenced_tensor\030\013 \003(\0132!.tensor" + - "flow.AllocationDescription\"P\n\017DeviceStep" + - "Stats\022\016\n\006device\030\001 \001(\t\022-\n\nnode_stats\030\002 \003(" + - "\0132\031.tensorflow.NodeExecStats\";\n\tStepStat", - "s\022.\n\tdev_stats\030\001 \003(\0132\033.tensorflow.Device" + - "StepStatsB-\n\030org.tensorflow.frameworkB\017S" + - "tepStatsProtosP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - org.tensorflow.framework.AllocationDescriptionProtos.getDescriptor(), - org.tensorflow.framework.TensorDescriptionProtos.getDescriptor(), - }, assigner); - internal_static_tensorflow_AllocatorMemoryUsed_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_tensorflow_AllocatorMemoryUsed_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_AllocatorMemoryUsed_descriptor, - new java.lang.String[] { "AllocatorName", "TotalBytes", "PeakBytes", }); - internal_static_tensorflow_NodeOutput_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_tensorflow_NodeOutput_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_NodeOutput_descriptor, - new java.lang.String[] { "Slot", "TensorDescription", }); - internal_static_tensorflow_NodeExecStats_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_tensorflow_NodeExecStats_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_NodeExecStats_descriptor, - new java.lang.String[] { "NodeName", "AllStartMicros", "OpStartRelMicros", "OpEndRelMicros", "AllEndRelMicros", "Memory", "Output", "TimelineLabel", "ScheduledMicros", "ThreadId", "ReferencedTensor", }); - internal_static_tensorflow_DeviceStepStats_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_tensorflow_DeviceStepStats_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_DeviceStepStats_descriptor, - new java.lang.String[] { "Device", "NodeStats", }); - internal_static_tensorflow_StepStats_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_tensorflow_StepStats_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_StepStats_descriptor, - new java.lang.String[] { "DevStats", }); - org.tensorflow.framework.AllocationDescriptionProtos.getDescriptor(); - org.tensorflow.framework.TensorDescriptionProtos.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/org/tensorflow/framework/Summary.java b/src/main/java/org/tensorflow/framework/Summary.java deleted file mode 100644 index 70978e7..0000000 --- a/src/main/java/org/tensorflow/framework/Summary.java +++ /dev/null @@ -1,2504 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/summary.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.Summary} - * - *
- * A Summary is a set of named values to be displayed by the
- * visualizer.
- * Summaries are produced regularly during training, as controlled by
- * the "summary_interval_secs" attribute of the training operation.
- * Summaries are also produced at the end of an evaluation.
- * 
- */ -public final class Summary extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.Summary) - SummaryOrBuilder { - // Use Summary.newBuilder() to construct. - private Summary(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Summary() { - value_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Summary( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - value_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - value_.add(input.readMessage(org.tensorflow.framework.Summary.Value.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - value_ = java.util.Collections.unmodifiableList(value_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_Summary_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_Summary_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.Summary.class, org.tensorflow.framework.Summary.Builder.class); - } - - public interface ImageOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.Summary.Image) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 height = 1; - * - *
-     * Dimensions of the image.
-     * 
- */ - int getHeight(); - - /** - * optional int32 width = 2; - */ - int getWidth(); - - /** - * optional int32 colorspace = 3; - * - *
-     * Valid colorspace values are
-     *   1 - grayscale
-     *   2 - grayscale + alpha
-     *   3 - RGB
-     *   4 - RGBA
-     *   5 - DIGITAL_YUV
-     *   6 - BGRA
-     * 
- */ - int getColorspace(); - - /** - * optional bytes encoded_image_string = 4; - * - *
-     * Image data in encoded format.  All image formats supported by
-     * image_codec::CoderUtil can be stored here.
-     * 
- */ - com.google.protobuf.ByteString getEncodedImageString(); - } - /** - * Protobuf type {@code tensorflow.Summary.Image} - */ - public static final class Image extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.Summary.Image) - ImageOrBuilder { - // Use Image.newBuilder() to construct. - private Image(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Image() { - height_ = 0; - width_ = 0; - colorspace_ = 0; - encodedImageString_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Image( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 8: { - - height_ = input.readInt32(); - break; - } - case 16: { - - width_ = input.readInt32(); - break; - } - case 24: { - - colorspace_ = input.readInt32(); - break; - } - case 34: { - - encodedImageString_ = input.readBytes(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_Summary_Image_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_Summary_Image_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.Summary.Image.class, org.tensorflow.framework.Summary.Image.Builder.class); - } - - public static final int HEIGHT_FIELD_NUMBER = 1; - private int height_; - /** - * optional int32 height = 1; - * - *
-     * Dimensions of the image.
-     * 
- */ - public int getHeight() { - return height_; - } - - public static final int WIDTH_FIELD_NUMBER = 2; - private int width_; - /** - * optional int32 width = 2; - */ - public int getWidth() { - return width_; - } - - public static final int COLORSPACE_FIELD_NUMBER = 3; - private int colorspace_; - /** - * optional int32 colorspace = 3; - * - *
-     * Valid colorspace values are
-     *   1 - grayscale
-     *   2 - grayscale + alpha
-     *   3 - RGB
-     *   4 - RGBA
-     *   5 - DIGITAL_YUV
-     *   6 - BGRA
-     * 
- */ - public int getColorspace() { - return colorspace_; - } - - public static final int ENCODED_IMAGE_STRING_FIELD_NUMBER = 4; - private com.google.protobuf.ByteString encodedImageString_; - /** - * optional bytes encoded_image_string = 4; - * - *
-     * Image data in encoded format.  All image formats supported by
-     * image_codec::CoderUtil can be stored here.
-     * 
- */ - public com.google.protobuf.ByteString getEncodedImageString() { - return encodedImageString_; - } - - 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 (height_ != 0) { - output.writeInt32(1, height_); - } - if (width_ != 0) { - output.writeInt32(2, width_); - } - if (colorspace_ != 0) { - output.writeInt32(3, colorspace_); - } - if (!encodedImageString_.isEmpty()) { - output.writeBytes(4, encodedImageString_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (height_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, height_); - } - if (width_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, width_); - } - if (colorspace_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, colorspace_); - } - if (!encodedImageString_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, encodedImageString_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.Summary.Image parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.Summary.Image 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.Summary.Image parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.Summary.Image parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.Summary.Image parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.Summary.Image parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.Summary.Image parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.Summary.Image parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.Summary.Image parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.Summary.Image parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.Summary.Image 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.Summary.Image} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.Summary.Image) - org.tensorflow.framework.Summary.ImageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_Summary_Image_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_Summary_Image_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.Summary.Image.class, org.tensorflow.framework.Summary.Image.Builder.class); - } - - // Construct using org.tensorflow.framework.Summary.Image.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - height_ = 0; - - width_ = 0; - - colorspace_ = 0; - - encodedImageString_ = com.google.protobuf.ByteString.EMPTY; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_Summary_Image_descriptor; - } - - public org.tensorflow.framework.Summary.Image getDefaultInstanceForType() { - return org.tensorflow.framework.Summary.Image.getDefaultInstance(); - } - - public org.tensorflow.framework.Summary.Image build() { - org.tensorflow.framework.Summary.Image result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.Summary.Image buildPartial() { - org.tensorflow.framework.Summary.Image result = new org.tensorflow.framework.Summary.Image(this); - result.height_ = height_; - result.width_ = width_; - result.colorspace_ = colorspace_; - result.encodedImageString_ = encodedImageString_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.Summary.Image) { - return mergeFrom((org.tensorflow.framework.Summary.Image)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.Summary.Image other) { - if (other == org.tensorflow.framework.Summary.Image.getDefaultInstance()) return this; - if (other.getHeight() != 0) { - setHeight(other.getHeight()); - } - if (other.getWidth() != 0) { - setWidth(other.getWidth()); - } - if (other.getColorspace() != 0) { - setColorspace(other.getColorspace()); - } - if (other.getEncodedImageString() != com.google.protobuf.ByteString.EMPTY) { - setEncodedImageString(other.getEncodedImageString()); - } - 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.Summary.Image parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.Summary.Image) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int height_ ; - /** - * optional int32 height = 1; - * - *
-       * Dimensions of the image.
-       * 
- */ - public int getHeight() { - return height_; - } - /** - * optional int32 height = 1; - * - *
-       * Dimensions of the image.
-       * 
- */ - public Builder setHeight(int value) { - - height_ = value; - onChanged(); - return this; - } - /** - * optional int32 height = 1; - * - *
-       * Dimensions of the image.
-       * 
- */ - public Builder clearHeight() { - - height_ = 0; - onChanged(); - return this; - } - - private int width_ ; - /** - * optional int32 width = 2; - */ - public int getWidth() { - return width_; - } - /** - * optional int32 width = 2; - */ - public Builder setWidth(int value) { - - width_ = value; - onChanged(); - return this; - } - /** - * optional int32 width = 2; - */ - public Builder clearWidth() { - - width_ = 0; - onChanged(); - return this; - } - - private int colorspace_ ; - /** - * optional int32 colorspace = 3; - * - *
-       * Valid colorspace values are
-       *   1 - grayscale
-       *   2 - grayscale + alpha
-       *   3 - RGB
-       *   4 - RGBA
-       *   5 - DIGITAL_YUV
-       *   6 - BGRA
-       * 
- */ - public int getColorspace() { - return colorspace_; - } - /** - * optional int32 colorspace = 3; - * - *
-       * Valid colorspace values are
-       *   1 - grayscale
-       *   2 - grayscale + alpha
-       *   3 - RGB
-       *   4 - RGBA
-       *   5 - DIGITAL_YUV
-       *   6 - BGRA
-       * 
- */ - public Builder setColorspace(int value) { - - colorspace_ = value; - onChanged(); - return this; - } - /** - * optional int32 colorspace = 3; - * - *
-       * Valid colorspace values are
-       *   1 - grayscale
-       *   2 - grayscale + alpha
-       *   3 - RGB
-       *   4 - RGBA
-       *   5 - DIGITAL_YUV
-       *   6 - BGRA
-       * 
- */ - public Builder clearColorspace() { - - colorspace_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString encodedImageString_ = com.google.protobuf.ByteString.EMPTY; - /** - * optional bytes encoded_image_string = 4; - * - *
-       * Image data in encoded format.  All image formats supported by
-       * image_codec::CoderUtil can be stored here.
-       * 
- */ - public com.google.protobuf.ByteString getEncodedImageString() { - return encodedImageString_; - } - /** - * optional bytes encoded_image_string = 4; - * - *
-       * Image data in encoded format.  All image formats supported by
-       * image_codec::CoderUtil can be stored here.
-       * 
- */ - public Builder setEncodedImageString(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - encodedImageString_ = value; - onChanged(); - return this; - } - /** - * optional bytes encoded_image_string = 4; - * - *
-       * Image data in encoded format.  All image formats supported by
-       * image_codec::CoderUtil can be stored here.
-       * 
- */ - public Builder clearEncodedImageString() { - - encodedImageString_ = getDefaultInstance().getEncodedImageString(); - 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.Summary.Image) - } - - // @@protoc_insertion_point(class_scope:tensorflow.Summary.Image) - private static final org.tensorflow.framework.Summary.Image DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.Summary.Image(); - } - - public static org.tensorflow.framework.Summary.Image getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Image parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Image(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.Summary.Image getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.Summary.Value) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string tag = 1; - * - *
-     * Tag name for the data.  Will be used as the title of the graph
-     * in the visualizer.
-     * Tag is usually "op_name:value_name", where "op_name" itself can have
-     * structure to indicate grouping.
-     * 
- */ - java.lang.String getTag(); - /** - * optional string tag = 1; - * - *
-     * Tag name for the data.  Will be used as the title of the graph
-     * in the visualizer.
-     * Tag is usually "op_name:value_name", where "op_name" itself can have
-     * structure to indicate grouping.
-     * 
- */ - com.google.protobuf.ByteString - getTagBytes(); - - /** - * optional float simple_value = 2; - */ - float getSimpleValue(); - - /** - * optional bytes obsolete_old_style_histogram = 3; - */ - com.google.protobuf.ByteString getObsoleteOldStyleHistogram(); - - /** - * optional .tensorflow.Summary.Image image = 4; - */ - org.tensorflow.framework.Summary.Image getImage(); - /** - * optional .tensorflow.Summary.Image image = 4; - */ - org.tensorflow.framework.Summary.ImageOrBuilder getImageOrBuilder(); - - /** - * optional .tensorflow.HistogramProto histo = 5; - */ - org.tensorflow.framework.HistogramProto getHisto(); - /** - * optional .tensorflow.HistogramProto histo = 5; - */ - org.tensorflow.framework.HistogramProtoOrBuilder getHistoOrBuilder(); - - public org.tensorflow.framework.Summary.Value.ValueCase getValueCase(); - } - /** - * Protobuf type {@code tensorflow.Summary.Value} - */ - public static final class Value extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.Summary.Value) - ValueOrBuilder { - // Use Value.newBuilder() to construct. - private Value(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Value() { - tag_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Value( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - String s = input.readStringRequireUtf8(); - - tag_ = s; - break; - } - case 21: { - valueCase_ = 2; - value_ = input.readFloat(); - break; - } - case 26: { - valueCase_ = 3; - value_ = input.readBytes(); - break; - } - case 34: { - org.tensorflow.framework.Summary.Image.Builder subBuilder = null; - if (valueCase_ == 4) { - subBuilder = ((org.tensorflow.framework.Summary.Image) value_).toBuilder(); - } - value_ = - input.readMessage(org.tensorflow.framework.Summary.Image.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((org.tensorflow.framework.Summary.Image) value_); - value_ = subBuilder.buildPartial(); - } - valueCase_ = 4; - break; - } - case 42: { - org.tensorflow.framework.HistogramProto.Builder subBuilder = null; - if (valueCase_ == 5) { - subBuilder = ((org.tensorflow.framework.HistogramProto) value_).toBuilder(); - } - value_ = - input.readMessage(org.tensorflow.framework.HistogramProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((org.tensorflow.framework.HistogramProto) value_); - value_ = subBuilder.buildPartial(); - } - valueCase_ = 5; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_Summary_Value_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_Summary_Value_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.Summary.Value.class, org.tensorflow.framework.Summary.Value.Builder.class); - } - - private int valueCase_ = 0; - private java.lang.Object value_; - public enum ValueCase - implements com.google.protobuf.Internal.EnumLite { - SIMPLE_VALUE(2), - OBSOLETE_OLD_STYLE_HISTOGRAM(3), - IMAGE(4), - HISTO(5), - VALUE_NOT_SET(0); - private int value = 0; - private ValueCase(int value) { - this.value = value; - } - public static ValueCase valueOf(int value) { - switch (value) { - case 2: return SIMPLE_VALUE; - case 3: return OBSOLETE_OLD_STYLE_HISTOGRAM; - case 4: return IMAGE; - case 5: return HISTO; - case 0: return VALUE_NOT_SET; - default: throw new java.lang.IllegalArgumentException( - "Value is undefined for this oneof enum."); - } - } - public int getNumber() { - return this.value; - } - }; - - public ValueCase - getValueCase() { - return ValueCase.valueOf( - valueCase_); - } - - public static final int TAG_FIELD_NUMBER = 1; - private volatile java.lang.Object tag_; - /** - * optional string tag = 1; - * - *
-     * Tag name for the data.  Will be used as the title of the graph
-     * in the visualizer.
-     * Tag is usually "op_name:value_name", where "op_name" itself can have
-     * structure to indicate grouping.
-     * 
- */ - public java.lang.String getTag() { - java.lang.Object ref = tag_; - 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(); - tag_ = s; - return s; - } - } - /** - * optional string tag = 1; - * - *
-     * Tag name for the data.  Will be used as the title of the graph
-     * in the visualizer.
-     * Tag is usually "op_name:value_name", where "op_name" itself can have
-     * structure to indicate grouping.
-     * 
- */ - public com.google.protobuf.ByteString - getTagBytes() { - java.lang.Object ref = tag_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - tag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SIMPLE_VALUE_FIELD_NUMBER = 2; - /** - * optional float simple_value = 2; - */ - public float getSimpleValue() { - if (valueCase_ == 2) { - return (java.lang.Float) value_; - } - return 0F; - } - - public static final int OBSOLETE_OLD_STYLE_HISTOGRAM_FIELD_NUMBER = 3; - /** - * optional bytes obsolete_old_style_histogram = 3; - */ - public com.google.protobuf.ByteString getObsoleteOldStyleHistogram() { - if (valueCase_ == 3) { - return (com.google.protobuf.ByteString) value_; - } - return com.google.protobuf.ByteString.EMPTY; - } - - public static final int IMAGE_FIELD_NUMBER = 4; - /** - * optional .tensorflow.Summary.Image image = 4; - */ - public org.tensorflow.framework.Summary.Image getImage() { - if (valueCase_ == 4) { - return (org.tensorflow.framework.Summary.Image) value_; - } - return org.tensorflow.framework.Summary.Image.getDefaultInstance(); - } - /** - * optional .tensorflow.Summary.Image image = 4; - */ - public org.tensorflow.framework.Summary.ImageOrBuilder getImageOrBuilder() { - if (valueCase_ == 4) { - return (org.tensorflow.framework.Summary.Image) value_; - } - return org.tensorflow.framework.Summary.Image.getDefaultInstance(); - } - - public static final int HISTO_FIELD_NUMBER = 5; - /** - * optional .tensorflow.HistogramProto histo = 5; - */ - public org.tensorflow.framework.HistogramProto getHisto() { - if (valueCase_ == 5) { - return (org.tensorflow.framework.HistogramProto) value_; - } - return org.tensorflow.framework.HistogramProto.getDefaultInstance(); - } - /** - * optional .tensorflow.HistogramProto histo = 5; - */ - public org.tensorflow.framework.HistogramProtoOrBuilder getHistoOrBuilder() { - if (valueCase_ == 5) { - return (org.tensorflow.framework.HistogramProto) value_; - } - return org.tensorflow.framework.HistogramProto.getDefaultInstance(); - } - - 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 (!getTagBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, tag_); - } - if (valueCase_ == 2) { - output.writeFloat( - 2, (float)((java.lang.Float) value_)); - } - if (valueCase_ == 3) { - output.writeBytes( - 3, (com.google.protobuf.ByteString)((com.google.protobuf.ByteString) value_)); - } - if (valueCase_ == 4) { - output.writeMessage(4, (org.tensorflow.framework.Summary.Image) value_); - } - if (valueCase_ == 5) { - output.writeMessage(5, (org.tensorflow.framework.HistogramProto) value_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getTagBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tag_); - } - if (valueCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize( - 2, (float)((java.lang.Float) value_)); - } - if (valueCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize( - 3, (com.google.protobuf.ByteString)((com.google.protobuf.ByteString) value_)); - } - if (valueCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (org.tensorflow.framework.Summary.Image) value_); - } - if (valueCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (org.tensorflow.framework.HistogramProto) value_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.Summary.Value parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.Summary.Value 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.Summary.Value parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.Summary.Value parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.Summary.Value parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.Summary.Value parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.Summary.Value parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.Summary.Value parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.Summary.Value parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.Summary.Value parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.Summary.Value 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.Summary.Value} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.Summary.Value) - org.tensorflow.framework.Summary.ValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_Summary_Value_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_Summary_Value_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.Summary.Value.class, org.tensorflow.framework.Summary.Value.Builder.class); - } - - // Construct using org.tensorflow.framework.Summary.Value.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - tag_ = ""; - - valueCase_ = 0; - value_ = null; - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_Summary_Value_descriptor; - } - - public org.tensorflow.framework.Summary.Value getDefaultInstanceForType() { - return org.tensorflow.framework.Summary.Value.getDefaultInstance(); - } - - public org.tensorflow.framework.Summary.Value build() { - org.tensorflow.framework.Summary.Value result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.Summary.Value buildPartial() { - org.tensorflow.framework.Summary.Value result = new org.tensorflow.framework.Summary.Value(this); - result.tag_ = tag_; - if (valueCase_ == 2) { - result.value_ = value_; - } - if (valueCase_ == 3) { - result.value_ = value_; - } - if (valueCase_ == 4) { - if (imageBuilder_ == null) { - result.value_ = value_; - } else { - result.value_ = imageBuilder_.build(); - } - } - if (valueCase_ == 5) { - if (histoBuilder_ == null) { - result.value_ = value_; - } else { - result.value_ = histoBuilder_.build(); - } - } - result.valueCase_ = valueCase_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.Summary.Value) { - return mergeFrom((org.tensorflow.framework.Summary.Value)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.Summary.Value other) { - if (other == org.tensorflow.framework.Summary.Value.getDefaultInstance()) return this; - if (!other.getTag().isEmpty()) { - tag_ = other.tag_; - onChanged(); - } - switch (other.getValueCase()) { - case SIMPLE_VALUE: { - setSimpleValue(other.getSimpleValue()); - break; - } - case OBSOLETE_OLD_STYLE_HISTOGRAM: { - setObsoleteOldStyleHistogram(other.getObsoleteOldStyleHistogram()); - break; - } - case IMAGE: { - mergeImage(other.getImage()); - break; - } - case HISTO: { - mergeHisto(other.getHisto()); - break; - } - case VALUE_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.Summary.Value parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.Summary.Value) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int valueCase_ = 0; - private java.lang.Object value_; - public ValueCase - getValueCase() { - return ValueCase.valueOf( - valueCase_); - } - - public Builder clearValue() { - valueCase_ = 0; - value_ = null; - onChanged(); - return this; - } - - - private java.lang.Object tag_ = ""; - /** - * optional string tag = 1; - * - *
-       * Tag name for the data.  Will be used as the title of the graph
-       * in the visualizer.
-       * Tag is usually "op_name:value_name", where "op_name" itself can have
-       * structure to indicate grouping.
-       * 
- */ - public java.lang.String getTag() { - java.lang.Object ref = tag_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tag_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string tag = 1; - * - *
-       * Tag name for the data.  Will be used as the title of the graph
-       * in the visualizer.
-       * Tag is usually "op_name:value_name", where "op_name" itself can have
-       * structure to indicate grouping.
-       * 
- */ - public com.google.protobuf.ByteString - getTagBytes() { - java.lang.Object ref = tag_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - tag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string tag = 1; - * - *
-       * Tag name for the data.  Will be used as the title of the graph
-       * in the visualizer.
-       * Tag is usually "op_name:value_name", where "op_name" itself can have
-       * structure to indicate grouping.
-       * 
- */ - public Builder setTag( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - tag_ = value; - onChanged(); - return this; - } - /** - * optional string tag = 1; - * - *
-       * Tag name for the data.  Will be used as the title of the graph
-       * in the visualizer.
-       * Tag is usually "op_name:value_name", where "op_name" itself can have
-       * structure to indicate grouping.
-       * 
- */ - public Builder clearTag() { - - tag_ = getDefaultInstance().getTag(); - onChanged(); - return this; - } - /** - * optional string tag = 1; - * - *
-       * Tag name for the data.  Will be used as the title of the graph
-       * in the visualizer.
-       * Tag is usually "op_name:value_name", where "op_name" itself can have
-       * structure to indicate grouping.
-       * 
- */ - public Builder setTagBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - tag_ = value; - onChanged(); - return this; - } - - /** - * optional float simple_value = 2; - */ - public float getSimpleValue() { - if (valueCase_ == 2) { - return (java.lang.Float) value_; - } - return 0F; - } - /** - * optional float simple_value = 2; - */ - public Builder setSimpleValue(float value) { - valueCase_ = 2; - value_ = value; - onChanged(); - return this; - } - /** - * optional float simple_value = 2; - */ - public Builder clearSimpleValue() { - if (valueCase_ == 2) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - * optional bytes obsolete_old_style_histogram = 3; - */ - public com.google.protobuf.ByteString getObsoleteOldStyleHistogram() { - if (valueCase_ == 3) { - return (com.google.protobuf.ByteString) value_; - } - return com.google.protobuf.ByteString.EMPTY; - } - /** - * optional bytes obsolete_old_style_histogram = 3; - */ - public Builder setObsoleteOldStyleHistogram(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - valueCase_ = 3; - value_ = value; - onChanged(); - return this; - } - /** - * optional bytes obsolete_old_style_histogram = 3; - */ - public Builder clearObsoleteOldStyleHistogram() { - if (valueCase_ == 3) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.Summary.Image, org.tensorflow.framework.Summary.Image.Builder, org.tensorflow.framework.Summary.ImageOrBuilder> imageBuilder_; - /** - * optional .tensorflow.Summary.Image image = 4; - */ - public org.tensorflow.framework.Summary.Image getImage() { - if (imageBuilder_ == null) { - if (valueCase_ == 4) { - return (org.tensorflow.framework.Summary.Image) value_; - } - return org.tensorflow.framework.Summary.Image.getDefaultInstance(); - } else { - if (valueCase_ == 4) { - return imageBuilder_.getMessage(); - } - return org.tensorflow.framework.Summary.Image.getDefaultInstance(); - } - } - /** - * optional .tensorflow.Summary.Image image = 4; - */ - public Builder setImage(org.tensorflow.framework.Summary.Image value) { - if (imageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - value_ = value; - onChanged(); - } else { - imageBuilder_.setMessage(value); - } - valueCase_ = 4; - return this; - } - /** - * optional .tensorflow.Summary.Image image = 4; - */ - public Builder setImage( - org.tensorflow.framework.Summary.Image.Builder builderForValue) { - if (imageBuilder_ == null) { - value_ = builderForValue.build(); - onChanged(); - } else { - imageBuilder_.setMessage(builderForValue.build()); - } - valueCase_ = 4; - return this; - } - /** - * optional .tensorflow.Summary.Image image = 4; - */ - public Builder mergeImage(org.tensorflow.framework.Summary.Image value) { - if (imageBuilder_ == null) { - if (valueCase_ == 4 && - value_ != org.tensorflow.framework.Summary.Image.getDefaultInstance()) { - value_ = org.tensorflow.framework.Summary.Image.newBuilder((org.tensorflow.framework.Summary.Image) value_) - .mergeFrom(value).buildPartial(); - } else { - value_ = value; - } - onChanged(); - } else { - if (valueCase_ == 4) { - imageBuilder_.mergeFrom(value); - } - imageBuilder_.setMessage(value); - } - valueCase_ = 4; - return this; - } - /** - * optional .tensorflow.Summary.Image image = 4; - */ - public Builder clearImage() { - if (imageBuilder_ == null) { - if (valueCase_ == 4) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - } else { - if (valueCase_ == 4) { - valueCase_ = 0; - value_ = null; - } - imageBuilder_.clear(); - } - return this; - } - /** - * optional .tensorflow.Summary.Image image = 4; - */ - public org.tensorflow.framework.Summary.Image.Builder getImageBuilder() { - return getImageFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.Summary.Image image = 4; - */ - public org.tensorflow.framework.Summary.ImageOrBuilder getImageOrBuilder() { - if ((valueCase_ == 4) && (imageBuilder_ != null)) { - return imageBuilder_.getMessageOrBuilder(); - } else { - if (valueCase_ == 4) { - return (org.tensorflow.framework.Summary.Image) value_; - } - return org.tensorflow.framework.Summary.Image.getDefaultInstance(); - } - } - /** - * optional .tensorflow.Summary.Image image = 4; - */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.Summary.Image, org.tensorflow.framework.Summary.Image.Builder, org.tensorflow.framework.Summary.ImageOrBuilder> - getImageFieldBuilder() { - if (imageBuilder_ == null) { - if (!(valueCase_ == 4)) { - value_ = org.tensorflow.framework.Summary.Image.getDefaultInstance(); - } - imageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.Summary.Image, org.tensorflow.framework.Summary.Image.Builder, org.tensorflow.framework.Summary.ImageOrBuilder>( - (org.tensorflow.framework.Summary.Image) value_, - getParentForChildren(), - isClean()); - value_ = null; - } - valueCase_ = 4; - onChanged();; - return imageBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.HistogramProto, org.tensorflow.framework.HistogramProto.Builder, org.tensorflow.framework.HistogramProtoOrBuilder> histoBuilder_; - /** - * optional .tensorflow.HistogramProto histo = 5; - */ - public org.tensorflow.framework.HistogramProto getHisto() { - if (histoBuilder_ == null) { - if (valueCase_ == 5) { - return (org.tensorflow.framework.HistogramProto) value_; - } - return org.tensorflow.framework.HistogramProto.getDefaultInstance(); - } else { - if (valueCase_ == 5) { - return histoBuilder_.getMessage(); - } - return org.tensorflow.framework.HistogramProto.getDefaultInstance(); - } - } - /** - * optional .tensorflow.HistogramProto histo = 5; - */ - public Builder setHisto(org.tensorflow.framework.HistogramProto value) { - if (histoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - value_ = value; - onChanged(); - } else { - histoBuilder_.setMessage(value); - } - valueCase_ = 5; - return this; - } - /** - * optional .tensorflow.HistogramProto histo = 5; - */ - public Builder setHisto( - org.tensorflow.framework.HistogramProto.Builder builderForValue) { - if (histoBuilder_ == null) { - value_ = builderForValue.build(); - onChanged(); - } else { - histoBuilder_.setMessage(builderForValue.build()); - } - valueCase_ = 5; - return this; - } - /** - * optional .tensorflow.HistogramProto histo = 5; - */ - public Builder mergeHisto(org.tensorflow.framework.HistogramProto value) { - if (histoBuilder_ == null) { - if (valueCase_ == 5 && - value_ != org.tensorflow.framework.HistogramProto.getDefaultInstance()) { - value_ = org.tensorflow.framework.HistogramProto.newBuilder((org.tensorflow.framework.HistogramProto) value_) - .mergeFrom(value).buildPartial(); - } else { - value_ = value; - } - onChanged(); - } else { - if (valueCase_ == 5) { - histoBuilder_.mergeFrom(value); - } - histoBuilder_.setMessage(value); - } - valueCase_ = 5; - return this; - } - /** - * optional .tensorflow.HistogramProto histo = 5; - */ - public Builder clearHisto() { - if (histoBuilder_ == null) { - if (valueCase_ == 5) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - } else { - if (valueCase_ == 5) { - valueCase_ = 0; - value_ = null; - } - histoBuilder_.clear(); - } - return this; - } - /** - * optional .tensorflow.HistogramProto histo = 5; - */ - public org.tensorflow.framework.HistogramProto.Builder getHistoBuilder() { - return getHistoFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.HistogramProto histo = 5; - */ - public org.tensorflow.framework.HistogramProtoOrBuilder getHistoOrBuilder() { - if ((valueCase_ == 5) && (histoBuilder_ != null)) { - return histoBuilder_.getMessageOrBuilder(); - } else { - if (valueCase_ == 5) { - return (org.tensorflow.framework.HistogramProto) value_; - } - return org.tensorflow.framework.HistogramProto.getDefaultInstance(); - } - } - /** - * optional .tensorflow.HistogramProto histo = 5; - */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.HistogramProto, org.tensorflow.framework.HistogramProto.Builder, org.tensorflow.framework.HistogramProtoOrBuilder> - getHistoFieldBuilder() { - if (histoBuilder_ == null) { - if (!(valueCase_ == 5)) { - value_ = org.tensorflow.framework.HistogramProto.getDefaultInstance(); - } - histoBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.HistogramProto, org.tensorflow.framework.HistogramProto.Builder, org.tensorflow.framework.HistogramProtoOrBuilder>( - (org.tensorflow.framework.HistogramProto) value_, - getParentForChildren(), - isClean()); - value_ = null; - } - valueCase_ = 5; - onChanged();; - return histoBuilder_; - } - 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.Summary.Value) - } - - // @@protoc_insertion_point(class_scope:tensorflow.Summary.Value) - private static final org.tensorflow.framework.Summary.Value DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.Summary.Value(); - } - - public static org.tensorflow.framework.Summary.Value getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Value parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Value(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.Summary.Value getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int VALUE_FIELD_NUMBER = 1; - private java.util.List value_; - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-   * Set of values for the summary.
-   * 
- */ - public java.util.List getValueList() { - return value_; - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-   * Set of values for the summary.
-   * 
- */ - public java.util.List - getValueOrBuilderList() { - return value_; - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-   * Set of values for the summary.
-   * 
- */ - public int getValueCount() { - return value_.size(); - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-   * Set of values for the summary.
-   * 
- */ - public org.tensorflow.framework.Summary.Value getValue(int index) { - return value_.get(index); - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-   * Set of values for the summary.
-   * 
- */ - public org.tensorflow.framework.Summary.ValueOrBuilder getValueOrBuilder( - int index) { - return value_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < value_.size(); i++) { - output.writeMessage(1, value_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < value_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, value_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.Summary parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.Summary 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.Summary parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.Summary parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.Summary parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.Summary parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.Summary parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.Summary parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.Summary parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.Summary parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.Summary 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.Summary} - * - *
-   * A Summary is a set of named values to be displayed by the
-   * visualizer.
-   * Summaries are produced regularly during training, as controlled by
-   * the "summary_interval_secs" attribute of the training operation.
-   * Summaries are also produced at the end of an evaluation.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.Summary) - org.tensorflow.framework.SummaryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_Summary_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_Summary_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.Summary.class, org.tensorflow.framework.Summary.Builder.class); - } - - // Construct using org.tensorflow.framework.Summary.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getValueFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (valueBuilder_ == null) { - value_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - valueBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.SummaryProtos.internal_static_tensorflow_Summary_descriptor; - } - - public org.tensorflow.framework.Summary getDefaultInstanceForType() { - return org.tensorflow.framework.Summary.getDefaultInstance(); - } - - public org.tensorflow.framework.Summary build() { - org.tensorflow.framework.Summary result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.Summary buildPartial() { - org.tensorflow.framework.Summary result = new org.tensorflow.framework.Summary(this); - int from_bitField0_ = bitField0_; - if (valueBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - value_ = java.util.Collections.unmodifiableList(value_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.value_ = value_; - } else { - result.value_ = valueBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.Summary) { - return mergeFrom((org.tensorflow.framework.Summary)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.Summary other) { - if (other == org.tensorflow.framework.Summary.getDefaultInstance()) return this; - if (valueBuilder_ == null) { - if (!other.value_.isEmpty()) { - if (value_.isEmpty()) { - value_ = other.value_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureValueIsMutable(); - value_.addAll(other.value_); - } - onChanged(); - } - } else { - if (!other.value_.isEmpty()) { - if (valueBuilder_.isEmpty()) { - valueBuilder_.dispose(); - valueBuilder_ = null; - value_ = other.value_; - bitField0_ = (bitField0_ & ~0x00000001); - valueBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getValueFieldBuilder() : null; - } else { - valueBuilder_.addAllMessages(other.value_); - } - } - } - 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.Summary parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.Summary) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List value_ = - java.util.Collections.emptyList(); - private void ensureValueIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - value_ = new java.util.ArrayList(value_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.Summary.Value, org.tensorflow.framework.Summary.Value.Builder, org.tensorflow.framework.Summary.ValueOrBuilder> valueBuilder_; - - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public java.util.List getValueList() { - if (valueBuilder_ == null) { - return java.util.Collections.unmodifiableList(value_); - } else { - return valueBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public int getValueCount() { - if (valueBuilder_ == null) { - return value_.size(); - } else { - return valueBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public org.tensorflow.framework.Summary.Value getValue(int index) { - if (valueBuilder_ == null) { - return value_.get(index); - } else { - return valueBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public Builder setValue( - int index, org.tensorflow.framework.Summary.Value value) { - if (valueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValueIsMutable(); - value_.set(index, value); - onChanged(); - } else { - valueBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public Builder setValue( - int index, org.tensorflow.framework.Summary.Value.Builder builderForValue) { - if (valueBuilder_ == null) { - ensureValueIsMutable(); - value_.set(index, builderForValue.build()); - onChanged(); - } else { - valueBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public Builder addValue(org.tensorflow.framework.Summary.Value value) { - if (valueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValueIsMutable(); - value_.add(value); - onChanged(); - } else { - valueBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public Builder addValue( - int index, org.tensorflow.framework.Summary.Value value) { - if (valueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValueIsMutable(); - value_.add(index, value); - onChanged(); - } else { - valueBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public Builder addValue( - org.tensorflow.framework.Summary.Value.Builder builderForValue) { - if (valueBuilder_ == null) { - ensureValueIsMutable(); - value_.add(builderForValue.build()); - onChanged(); - } else { - valueBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public Builder addValue( - int index, org.tensorflow.framework.Summary.Value.Builder builderForValue) { - if (valueBuilder_ == null) { - ensureValueIsMutable(); - value_.add(index, builderForValue.build()); - onChanged(); - } else { - valueBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public Builder addAllValue( - java.lang.Iterable values) { - if (valueBuilder_ == null) { - ensureValueIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, value_); - onChanged(); - } else { - valueBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public Builder clearValue() { - if (valueBuilder_ == null) { - value_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - valueBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public Builder removeValue(int index) { - if (valueBuilder_ == null) { - ensureValueIsMutable(); - value_.remove(index); - onChanged(); - } else { - valueBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public org.tensorflow.framework.Summary.Value.Builder getValueBuilder( - int index) { - return getValueFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public org.tensorflow.framework.Summary.ValueOrBuilder getValueOrBuilder( - int index) { - if (valueBuilder_ == null) { - return value_.get(index); } else { - return valueBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public java.util.List - getValueOrBuilderList() { - if (valueBuilder_ != null) { - return valueBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(value_); - } - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public org.tensorflow.framework.Summary.Value.Builder addValueBuilder() { - return getValueFieldBuilder().addBuilder( - org.tensorflow.framework.Summary.Value.getDefaultInstance()); - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public org.tensorflow.framework.Summary.Value.Builder addValueBuilder( - int index) { - return getValueFieldBuilder().addBuilder( - index, org.tensorflow.framework.Summary.Value.getDefaultInstance()); - } - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-     * Set of values for the summary.
-     * 
- */ - public java.util.List - getValueBuilderList() { - return getValueFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.Summary.Value, org.tensorflow.framework.Summary.Value.Builder, org.tensorflow.framework.Summary.ValueOrBuilder> - getValueFieldBuilder() { - if (valueBuilder_ == null) { - valueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.Summary.Value, org.tensorflow.framework.Summary.Value.Builder, org.tensorflow.framework.Summary.ValueOrBuilder>( - value_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - value_ = null; - } - return valueBuilder_; - } - 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.Summary) - } - - // @@protoc_insertion_point(class_scope:tensorflow.Summary) - private static final org.tensorflow.framework.Summary DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.Summary(); - } - - public static org.tensorflow.framework.Summary getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Summary parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Summary(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.Summary getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/SummaryOrBuilder.java b/src/main/java/org/tensorflow/framework/SummaryOrBuilder.java deleted file mode 100644 index 275f213..0000000 --- a/src/main/java/org/tensorflow/framework/SummaryOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/summary.proto - -package org.tensorflow.framework; - -public interface SummaryOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.Summary) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-   * Set of values for the summary.
-   * 
- */ - java.util.List - getValueList(); - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-   * Set of values for the summary.
-   * 
- */ - org.tensorflow.framework.Summary.Value getValue(int index); - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-   * Set of values for the summary.
-   * 
- */ - int getValueCount(); - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-   * Set of values for the summary.
-   * 
- */ - java.util.List - getValueOrBuilderList(); - /** - * repeated .tensorflow.Summary.Value value = 1; - * - *
-   * Set of values for the summary.
-   * 
- */ - org.tensorflow.framework.Summary.ValueOrBuilder getValueOrBuilder( - int index); -} diff --git a/src/main/java/org/tensorflow/framework/SummaryProtos.java b/src/main/java/org/tensorflow/framework/SummaryProtos.java deleted file mode 100644 index ce5df1b..0000000 --- a/src/main/java/org/tensorflow/framework/SummaryProtos.java +++ /dev/null @@ -1,95 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/summary.proto - -package org.tensorflow.framework; - -public final class SummaryProtos { - private SummaryProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_HistogramProto_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_HistogramProto_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_Summary_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_Summary_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_Summary_Image_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_Summary_Image_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_Summary_Value_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_Summary_Value_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\'tensorflow/core/framework/summary.prot" + - "o\022\ntensorflow\"\207\001\n\016HistogramProto\022\013\n\003min\030" + - "\001 \001(\001\022\013\n\003max\030\002 \001(\001\022\013\n\003num\030\003 \001(\001\022\013\n\003sum\030\004" + - " \001(\001\022\023\n\013sum_squares\030\005 \001(\001\022\030\n\014bucket_limi" + - "t\030\006 \003(\001B\002\020\001\022\022\n\006bucket\030\007 \003(\001B\002\020\001\"\306\002\n\007Summ" + - "ary\022(\n\005value\030\001 \003(\0132\031.tensorflow.Summary." + - "Value\032X\n\005Image\022\016\n\006height\030\001 \001(\005\022\r\n\005width\030" + - "\002 \001(\005\022\022\n\ncolorspace\030\003 \001(\005\022\034\n\024encoded_ima" + - "ge_string\030\004 \001(\014\032\266\001\n\005Value\022\013\n\003tag\030\001 \001(\t\022\026" + - "\n\014simple_value\030\002 \001(\002H\000\022&\n\034obsolete_old_s", - "tyle_histogram\030\003 \001(\014H\000\022*\n\005image\030\004 \001(\0132\031." + - "tensorflow.Summary.ImageH\000\022+\n\005histo\030\005 \001(" + - "\0132\032.tensorflow.HistogramProtoH\000B\007\n\005value" + - "B+\n\030org.tensorflow.frameworkB\rSummaryPro" + - "tosP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_tensorflow_HistogramProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_tensorflow_HistogramProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_HistogramProto_descriptor, - new java.lang.String[] { "Min", "Max", "Num", "Sum", "SumSquares", "BucketLimit", "Bucket", }); - internal_static_tensorflow_Summary_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_tensorflow_Summary_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_Summary_descriptor, - new java.lang.String[] { "Value", }); - internal_static_tensorflow_Summary_Image_descriptor = - internal_static_tensorflow_Summary_descriptor.getNestedTypes().get(0); - internal_static_tensorflow_Summary_Image_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_Summary_Image_descriptor, - new java.lang.String[] { "Height", "Width", "Colorspace", "EncodedImageString", }); - internal_static_tensorflow_Summary_Value_descriptor = - internal_static_tensorflow_Summary_descriptor.getNestedTypes().get(1); - internal_static_tensorflow_Summary_Value_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_Summary_Value_descriptor, - new java.lang.String[] { "Tag", "SimpleValue", "ObsoleteOldStyleHistogram", "Image", "Histo", "Value", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/org/tensorflow/framework/TensorDescription.java b/src/main/java/org/tensorflow/framework/TensorDescription.java deleted file mode 100644 index 3f311ed..0000000 --- a/src/main/java/org/tensorflow/framework/TensorDescription.java +++ /dev/null @@ -1,865 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/tensor_description.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.TensorDescription} - */ -public final class TensorDescription extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.TensorDescription) - TensorDescriptionOrBuilder { - // Use TensorDescription.newBuilder() to construct. - private TensorDescription(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TensorDescription() { - dtype_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private TensorDescription( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - - dtype_ = rawValue; - break; - } - case 18: { - org.tensorflow.framework.TensorShapeProto.Builder subBuilder = null; - if (shape_ != null) { - subBuilder = shape_.toBuilder(); - } - shape_ = input.readMessage(org.tensorflow.framework.TensorShapeProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(shape_); - shape_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - org.tensorflow.framework.AllocationDescription.Builder subBuilder = null; - if (allocationDescription_ != null) { - subBuilder = allocationDescription_.toBuilder(); - } - allocationDescription_ = input.readMessage(org.tensorflow.framework.AllocationDescription.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(allocationDescription_); - allocationDescription_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.TensorDescriptionProtos.internal_static_tensorflow_TensorDescription_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.TensorDescriptionProtos.internal_static_tensorflow_TensorDescription_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.TensorDescription.class, org.tensorflow.framework.TensorDescription.Builder.class); - } - - public static final int DTYPE_FIELD_NUMBER = 1; - private int dtype_; - /** - * optional .tensorflow.DataType dtype = 1; - * - *
-   * Data type of tensor elements
-   * 
- */ - public int getDtypeValue() { - return dtype_; - } - /** - * optional .tensorflow.DataType dtype = 1; - * - *
-   * Data type of tensor elements
-   * 
- */ - 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 SHAPE_FIELD_NUMBER = 2; - private org.tensorflow.framework.TensorShapeProto shape_; - /** - * optional .tensorflow.TensorShapeProto shape = 2; - * - *
-   * Shape of the tensor.
-   * 
- */ - public boolean hasShape() { - return shape_ != null; - } - /** - * optional .tensorflow.TensorShapeProto shape = 2; - * - *
-   * Shape of the tensor.
-   * 
- */ - public org.tensorflow.framework.TensorShapeProto getShape() { - return shape_ == null ? org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : shape_; - } - /** - * optional .tensorflow.TensorShapeProto shape = 2; - * - *
-   * Shape of the tensor.
-   * 
- */ - public org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { - return getShape(); - } - - public static final int ALLOCATION_DESCRIPTION_FIELD_NUMBER = 4; - private org.tensorflow.framework.AllocationDescription allocationDescription_; - /** - * optional .tensorflow.AllocationDescription allocation_description = 4; - * - *
-   * Information about the size and allocator used for the data
-   * 
- */ - public boolean hasAllocationDescription() { - return allocationDescription_ != null; - } - /** - * optional .tensorflow.AllocationDescription allocation_description = 4; - * - *
-   * Information about the size and allocator used for the data
-   * 
- */ - public org.tensorflow.framework.AllocationDescription getAllocationDescription() { - return allocationDescription_ == null ? org.tensorflow.framework.AllocationDescription.getDefaultInstance() : allocationDescription_; - } - /** - * optional .tensorflow.AllocationDescription allocation_description = 4; - * - *
-   * Information about the size and allocator used for the data
-   * 
- */ - public org.tensorflow.framework.AllocationDescriptionOrBuilder getAllocationDescriptionOrBuilder() { - return getAllocationDescription(); - } - - 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 (dtype_ != org.tensorflow.framework.DataType.DT_INVALID.getNumber()) { - output.writeEnum(1, dtype_); - } - if (shape_ != null) { - output.writeMessage(2, getShape()); - } - if (allocationDescription_ != null) { - output.writeMessage(4, getAllocationDescription()); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dtype_ != org.tensorflow.framework.DataType.DT_INVALID.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, dtype_); - } - if (shape_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getShape()); - } - if (allocationDescription_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getAllocationDescription()); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.TensorDescription parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.TensorDescription 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.TensorDescription parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.TensorDescription parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.TensorDescription parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.TensorDescription parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.TensorDescription parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.TensorDescription parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.TensorDescription parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.TensorDescription parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.TensorDescription 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.TensorDescription} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.TensorDescription) - org.tensorflow.framework.TensorDescriptionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.TensorDescriptionProtos.internal_static_tensorflow_TensorDescription_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.TensorDescriptionProtos.internal_static_tensorflow_TensorDescription_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.TensorDescription.class, org.tensorflow.framework.TensorDescription.Builder.class); - } - - // Construct using org.tensorflow.framework.TensorDescription.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - dtype_ = 0; - - if (shapeBuilder_ == null) { - shape_ = null; - } else { - shape_ = null; - shapeBuilder_ = null; - } - if (allocationDescriptionBuilder_ == null) { - allocationDescription_ = null; - } else { - allocationDescription_ = null; - allocationDescriptionBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.TensorDescriptionProtos.internal_static_tensorflow_TensorDescription_descriptor; - } - - public org.tensorflow.framework.TensorDescription getDefaultInstanceForType() { - return org.tensorflow.framework.TensorDescription.getDefaultInstance(); - } - - public org.tensorflow.framework.TensorDescription build() { - org.tensorflow.framework.TensorDescription result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.TensorDescription buildPartial() { - org.tensorflow.framework.TensorDescription result = new org.tensorflow.framework.TensorDescription(this); - result.dtype_ = dtype_; - if (shapeBuilder_ == null) { - result.shape_ = shape_; - } else { - result.shape_ = shapeBuilder_.build(); - } - if (allocationDescriptionBuilder_ == null) { - result.allocationDescription_ = allocationDescription_; - } else { - result.allocationDescription_ = allocationDescriptionBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.TensorDescription) { - return mergeFrom((org.tensorflow.framework.TensorDescription)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.TensorDescription other) { - if (other == org.tensorflow.framework.TensorDescription.getDefaultInstance()) return this; - if (other.dtype_ != 0) { - setDtypeValue(other.getDtypeValue()); - } - if (other.hasShape()) { - mergeShape(other.getShape()); - } - if (other.hasAllocationDescription()) { - mergeAllocationDescription(other.getAllocationDescription()); - } - 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.TensorDescription parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.TensorDescription) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int dtype_ = 0; - /** - * optional .tensorflow.DataType dtype = 1; - * - *
-     * Data type of tensor elements
-     * 
- */ - public int getDtypeValue() { - return dtype_; - } - /** - * optional .tensorflow.DataType dtype = 1; - * - *
-     * Data type of tensor elements
-     * 
- */ - public Builder setDtypeValue(int value) { - dtype_ = value; - onChanged(); - return this; - } - /** - * optional .tensorflow.DataType dtype = 1; - * - *
-     * Data type of tensor elements
-     * 
- */ - public org.tensorflow.framework.DataType getDtype() { - org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(dtype_); - return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result; - } - /** - * optional .tensorflow.DataType dtype = 1; - * - *
-     * Data type of tensor elements
-     * 
- */ - public Builder setDtype(org.tensorflow.framework.DataType value) { - if (value == null) { - throw new NullPointerException(); - } - - dtype_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .tensorflow.DataType dtype = 1; - * - *
-     * Data type of tensor elements
-     * 
- */ - public Builder clearDtype() { - - dtype_ = 0; - onChanged(); - return this; - } - - private org.tensorflow.framework.TensorShapeProto shape_ = null; - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> shapeBuilder_; - /** - * optional .tensorflow.TensorShapeProto shape = 2; - * - *
-     * Shape of the tensor.
-     * 
- */ - public boolean hasShape() { - return shapeBuilder_ != null || shape_ != null; - } - /** - * optional .tensorflow.TensorShapeProto shape = 2; - * - *
-     * Shape of the tensor.
-     * 
- */ - public org.tensorflow.framework.TensorShapeProto getShape() { - if (shapeBuilder_ == null) { - return shape_ == null ? org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : shape_; - } else { - return shapeBuilder_.getMessage(); - } - } - /** - * optional .tensorflow.TensorShapeProto shape = 2; - * - *
-     * Shape of the tensor.
-     * 
- */ - public Builder setShape(org.tensorflow.framework.TensorShapeProto value) { - if (shapeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - shape_ = value; - onChanged(); - } else { - shapeBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .tensorflow.TensorShapeProto shape = 2; - * - *
-     * Shape of the tensor.
-     * 
- */ - public Builder setShape( - org.tensorflow.framework.TensorShapeProto.Builder builderForValue) { - if (shapeBuilder_ == null) { - shape_ = builderForValue.build(); - onChanged(); - } else { - shapeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .tensorflow.TensorShapeProto shape = 2; - * - *
-     * Shape of the tensor.
-     * 
- */ - public Builder mergeShape(org.tensorflow.framework.TensorShapeProto value) { - if (shapeBuilder_ == null) { - if (shape_ != null) { - shape_ = - org.tensorflow.framework.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial(); - } else { - shape_ = value; - } - onChanged(); - } else { - shapeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .tensorflow.TensorShapeProto shape = 2; - * - *
-     * Shape of the tensor.
-     * 
- */ - public Builder clearShape() { - if (shapeBuilder_ == null) { - shape_ = null; - onChanged(); - } else { - shape_ = null; - shapeBuilder_ = null; - } - - return this; - } - /** - * optional .tensorflow.TensorShapeProto shape = 2; - * - *
-     * Shape of the tensor.
-     * 
- */ - public org.tensorflow.framework.TensorShapeProto.Builder getShapeBuilder() { - - onChanged(); - return getShapeFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.TensorShapeProto shape = 2; - * - *
-     * Shape of the tensor.
-     * 
- */ - public org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() { - if (shapeBuilder_ != null) { - return shapeBuilder_.getMessageOrBuilder(); - } else { - return shape_ == null ? - org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : shape_; - } - } - /** - * optional .tensorflow.TensorShapeProto shape = 2; - * - *
-     * Shape of the tensor.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> - getShapeFieldBuilder() { - if (shapeBuilder_ == null) { - shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>( - getShape(), - getParentForChildren(), - isClean()); - shape_ = null; - } - return shapeBuilder_; - } - - private org.tensorflow.framework.AllocationDescription allocationDescription_ = null; - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.AllocationDescription, org.tensorflow.framework.AllocationDescription.Builder, org.tensorflow.framework.AllocationDescriptionOrBuilder> allocationDescriptionBuilder_; - /** - * optional .tensorflow.AllocationDescription allocation_description = 4; - * - *
-     * Information about the size and allocator used for the data
-     * 
- */ - public boolean hasAllocationDescription() { - return allocationDescriptionBuilder_ != null || allocationDescription_ != null; - } - /** - * optional .tensorflow.AllocationDescription allocation_description = 4; - * - *
-     * Information about the size and allocator used for the data
-     * 
- */ - public org.tensorflow.framework.AllocationDescription getAllocationDescription() { - if (allocationDescriptionBuilder_ == null) { - return allocationDescription_ == null ? org.tensorflow.framework.AllocationDescription.getDefaultInstance() : allocationDescription_; - } else { - return allocationDescriptionBuilder_.getMessage(); - } - } - /** - * optional .tensorflow.AllocationDescription allocation_description = 4; - * - *
-     * Information about the size and allocator used for the data
-     * 
- */ - public Builder setAllocationDescription(org.tensorflow.framework.AllocationDescription value) { - if (allocationDescriptionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - allocationDescription_ = value; - onChanged(); - } else { - allocationDescriptionBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .tensorflow.AllocationDescription allocation_description = 4; - * - *
-     * Information about the size and allocator used for the data
-     * 
- */ - public Builder setAllocationDescription( - org.tensorflow.framework.AllocationDescription.Builder builderForValue) { - if (allocationDescriptionBuilder_ == null) { - allocationDescription_ = builderForValue.build(); - onChanged(); - } else { - allocationDescriptionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .tensorflow.AllocationDescription allocation_description = 4; - * - *
-     * Information about the size and allocator used for the data
-     * 
- */ - public Builder mergeAllocationDescription(org.tensorflow.framework.AllocationDescription value) { - if (allocationDescriptionBuilder_ == null) { - if (allocationDescription_ != null) { - allocationDescription_ = - org.tensorflow.framework.AllocationDescription.newBuilder(allocationDescription_).mergeFrom(value).buildPartial(); - } else { - allocationDescription_ = value; - } - onChanged(); - } else { - allocationDescriptionBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .tensorflow.AllocationDescription allocation_description = 4; - * - *
-     * Information about the size and allocator used for the data
-     * 
- */ - public Builder clearAllocationDescription() { - if (allocationDescriptionBuilder_ == null) { - allocationDescription_ = null; - onChanged(); - } else { - allocationDescription_ = null; - allocationDescriptionBuilder_ = null; - } - - return this; - } - /** - * optional .tensorflow.AllocationDescription allocation_description = 4; - * - *
-     * Information about the size and allocator used for the data
-     * 
- */ - public org.tensorflow.framework.AllocationDescription.Builder getAllocationDescriptionBuilder() { - - onChanged(); - return getAllocationDescriptionFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.AllocationDescription allocation_description = 4; - * - *
-     * Information about the size and allocator used for the data
-     * 
- */ - public org.tensorflow.framework.AllocationDescriptionOrBuilder getAllocationDescriptionOrBuilder() { - if (allocationDescriptionBuilder_ != null) { - return allocationDescriptionBuilder_.getMessageOrBuilder(); - } else { - return allocationDescription_ == null ? - org.tensorflow.framework.AllocationDescription.getDefaultInstance() : allocationDescription_; - } - } - /** - * optional .tensorflow.AllocationDescription allocation_description = 4; - * - *
-     * Information about the size and allocator used for the data
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.AllocationDescription, org.tensorflow.framework.AllocationDescription.Builder, org.tensorflow.framework.AllocationDescriptionOrBuilder> - getAllocationDescriptionFieldBuilder() { - if (allocationDescriptionBuilder_ == null) { - allocationDescriptionBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.AllocationDescription, org.tensorflow.framework.AllocationDescription.Builder, org.tensorflow.framework.AllocationDescriptionOrBuilder>( - getAllocationDescription(), - getParentForChildren(), - isClean()); - allocationDescription_ = null; - } - return allocationDescriptionBuilder_; - } - 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.TensorDescription) - } - - // @@protoc_insertion_point(class_scope:tensorflow.TensorDescription) - private static final org.tensorflow.framework.TensorDescription DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.TensorDescription(); - } - - public static org.tensorflow.framework.TensorDescription getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public TensorDescription parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new TensorDescription(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.TensorDescription getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/TensorDescriptionOrBuilder.java b/src/main/java/org/tensorflow/framework/TensorDescriptionOrBuilder.java deleted file mode 100644 index a156338..0000000 --- a/src/main/java/org/tensorflow/framework/TensorDescriptionOrBuilder.java +++ /dev/null @@ -1,76 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/tensor_description.proto - -package org.tensorflow.framework; - -public interface TensorDescriptionOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.TensorDescription) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .tensorflow.DataType dtype = 1; - * - *
-   * Data type of tensor elements
-   * 
- */ - int getDtypeValue(); - /** - * optional .tensorflow.DataType dtype = 1; - * - *
-   * Data type of tensor elements
-   * 
- */ - org.tensorflow.framework.DataType getDtype(); - - /** - * optional .tensorflow.TensorShapeProto shape = 2; - * - *
-   * Shape of the tensor.
-   * 
- */ - boolean hasShape(); - /** - * optional .tensorflow.TensorShapeProto shape = 2; - * - *
-   * Shape of the tensor.
-   * 
- */ - org.tensorflow.framework.TensorShapeProto getShape(); - /** - * optional .tensorflow.TensorShapeProto shape = 2; - * - *
-   * Shape of the tensor.
-   * 
- */ - org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder(); - - /** - * optional .tensorflow.AllocationDescription allocation_description = 4; - * - *
-   * Information about the size and allocator used for the data
-   * 
- */ - boolean hasAllocationDescription(); - /** - * optional .tensorflow.AllocationDescription allocation_description = 4; - * - *
-   * Information about the size and allocator used for the data
-   * 
- */ - org.tensorflow.framework.AllocationDescription getAllocationDescription(); - /** - * optional .tensorflow.AllocationDescription allocation_description = 4; - * - *
-   * Information about the size and allocator used for the data
-   * 
- */ - org.tensorflow.framework.AllocationDescriptionOrBuilder getAllocationDescriptionOrBuilder(); -} diff --git a/src/main/java/org/tensorflow/framework/TensorDescriptionProtos.java b/src/main/java/org/tensorflow/framework/TensorDescriptionProtos.java deleted file mode 100644 index ef945ef..0000000 --- a/src/main/java/org/tensorflow/framework/TensorDescriptionProtos.java +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/tensor_description.proto - -package org.tensorflow.framework; - -public final class TensorDescriptionProtos { - private TensorDescriptionProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_TensorDescription_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_TensorDescription_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n2tensorflow/core/framework/tensor_descr" + - "iption.proto\022\ntensorflow\032%tensorflow/cor" + - "e/framework/types.proto\032,tensorflow/core" + - "/framework/tensor_shape.proto\0326tensorflo" + - "w/core/framework/allocation_description." + - "proto\"\250\001\n\021TensorDescription\022#\n\005dtype\030\001 \001" + - "(\0162\024.tensorflow.DataType\022+\n\005shape\030\002 \001(\0132" + - "\034.tensorflow.TensorShapeProto\022A\n\026allocat" + - "ion_description\030\004 \001(\0132!.tensorflow.Alloc" + - "ationDescriptionB5\n\030org.tensorflow.frame", - "workB\027TensorDescriptionProtosP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - org.tensorflow.framework.TypesProtos.getDescriptor(), - org.tensorflow.framework.TensorShapeProtos.getDescriptor(), - org.tensorflow.framework.AllocationDescriptionProtos.getDescriptor(), - }, assigner); - internal_static_tensorflow_TensorDescription_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_tensorflow_TensorDescription_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_TensorDescription_descriptor, - new java.lang.String[] { "Dtype", "Shape", "AllocationDescription", }); - org.tensorflow.framework.TypesProtos.getDescriptor(); - org.tensorflow.framework.TensorShapeProtos.getDescriptor(); - org.tensorflow.framework.AllocationDescriptionProtos.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/org/tensorflow/framework/TensorProto.java b/src/main/java/org/tensorflow/framework/TensorProto.java deleted file mode 100644 index 46936c5..0000000 --- a/src/main/java/org/tensorflow/framework/TensorProto.java +++ /dev/null @@ -1,2115 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/tensor.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.TensorProto} - * - *
- * Protocol buffer representing a tensor.
- * 
- */ -public final class TensorProto extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.TensorProto) - TensorProtoOrBuilder { - // Use TensorProto.newBuilder() to construct. - private TensorProto(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TensorProto() { - dtype_ = 0; - versionNumber_ = 0; - tensorContent_ = com.google.protobuf.ByteString.EMPTY; - floatVal_ = java.util.Collections.emptyList(); - doubleVal_ = java.util.Collections.emptyList(); - intVal_ = java.util.Collections.emptyList(); - stringVal_ = java.util.Collections.emptyList(); - scomplexVal_ = java.util.Collections.emptyList(); - int64Val_ = java.util.Collections.emptyList(); - boolVal_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private TensorProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - - dtype_ = rawValue; - break; - } - case 18: { - org.tensorflow.framework.TensorShapeProto.Builder subBuilder = null; - if (tensorShape_ != null) { - subBuilder = tensorShape_.toBuilder(); - } - tensorShape_ = input.readMessage(org.tensorflow.framework.TensorShapeProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tensorShape_); - tensorShape_ = subBuilder.buildPartial(); - } - - break; - } - case 24: { - - versionNumber_ = input.readInt32(); - break; - } - case 34: { - - tensorContent_ = input.readBytes(); - break; - } - case 45: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - floatVal_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - floatVal_.add(input.readFloat()); - break; - } - case 42: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) { - floatVal_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - while (input.getBytesUntilLimit() > 0) { - floatVal_.add(input.readFloat()); - } - input.popLimit(limit); - break; - } - case 49: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - doubleVal_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - doubleVal_.add(input.readDouble()); - break; - } - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) { - doubleVal_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - while (input.getBytesUntilLimit() > 0) { - doubleVal_.add(input.readDouble()); - } - input.popLimit(limit); - break; - } - case 56: { - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - intVal_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - intVal_.add(input.readInt32()); - break; - } - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040) && input.getBytesUntilLimit() > 0) { - intVal_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - while (input.getBytesUntilLimit() > 0) { - intVal_.add(input.readInt32()); - } - input.popLimit(limit); - break; - } - case 66: { - if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { - stringVal_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000080; - } - stringVal_.add(input.readBytes()); - break; - } - case 77: { - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { - scomplexVal_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000100; - } - scomplexVal_.add(input.readFloat()); - break; - } - case 74: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100) && input.getBytesUntilLimit() > 0) { - scomplexVal_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000100; - } - while (input.getBytesUntilLimit() > 0) { - scomplexVal_.add(input.readFloat()); - } - input.popLimit(limit); - break; - } - case 80: { - if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) { - int64Val_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - int64Val_.add(input.readInt64()); - break; - } - case 82: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000200) == 0x00000200) && input.getBytesUntilLimit() > 0) { - int64Val_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - while (input.getBytesUntilLimit() > 0) { - int64Val_.add(input.readInt64()); - } - input.popLimit(limit); - break; - } - case 88: { - if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) { - boolVal_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000400; - } - boolVal_.add(input.readBool()); - break; - } - case 90: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000400) == 0x00000400) && input.getBytesUntilLimit() > 0) { - boolVal_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000400; - } - while (input.getBytesUntilLimit() > 0) { - boolVal_.add(input.readBool()); - } - input.popLimit(limit); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - floatVal_ = java.util.Collections.unmodifiableList(floatVal_); - } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - doubleVal_ = java.util.Collections.unmodifiableList(doubleVal_); - } - if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - intVal_ = java.util.Collections.unmodifiableList(intVal_); - } - if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { - stringVal_ = java.util.Collections.unmodifiableList(stringVal_); - } - if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { - scomplexVal_ = java.util.Collections.unmodifiableList(scomplexVal_); - } - if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) { - int64Val_ = java.util.Collections.unmodifiableList(int64Val_); - } - if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) { - boolVal_ = java.util.Collections.unmodifiableList(boolVal_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.TensorProtos.internal_static_tensorflow_TensorProto_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.TensorProtos.internal_static_tensorflow_TensorProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.TensorProto.class, org.tensorflow.framework.TensorProto.Builder.class); - } - - private int bitField0_; - public static final int DTYPE_FIELD_NUMBER = 1; - private int dtype_; - /** - * optional .tensorflow.DataType dtype = 1; - */ - public int getDtypeValue() { - return dtype_; - } - /** - * optional .tensorflow.DataType dtype = 1; - */ - public org.tensorflow.framework.DataType getDtype() { - org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(dtype_); - return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result; - } - - public static final int TENSOR_SHAPE_FIELD_NUMBER = 2; - private org.tensorflow.framework.TensorShapeProto tensorShape_; - /** - * optional .tensorflow.TensorShapeProto tensor_shape = 2; - * - *
-   * Shape of the tensor.  TODO(touts): sort out the 0-rank issues.
-   * 
- */ - public boolean hasTensorShape() { - return tensorShape_ != null; - } - /** - * optional .tensorflow.TensorShapeProto tensor_shape = 2; - * - *
-   * Shape of the tensor.  TODO(touts): sort out the 0-rank issues.
-   * 
- */ - public org.tensorflow.framework.TensorShapeProto getTensorShape() { - return tensorShape_ == null ? org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : tensorShape_; - } - /** - * optional .tensorflow.TensorShapeProto tensor_shape = 2; - * - *
-   * Shape of the tensor.  TODO(touts): sort out the 0-rank issues.
-   * 
- */ - public org.tensorflow.framework.TensorShapeProtoOrBuilder getTensorShapeOrBuilder() { - return getTensorShape(); - } - - public static final int VERSION_NUMBER_FIELD_NUMBER = 3; - private int versionNumber_; - /** - * optional int32 version_number = 3; - * - *
-   * Version number.
-   * In version 0, if the "repeated xxx" representations contain only one
-   * element, that element is repeated to fill the shape.  This makes it easy
-   * to represent a constant Tensor with a single value.
-   * 
- */ - public int getVersionNumber() { - return versionNumber_; - } - - public static final int TENSOR_CONTENT_FIELD_NUMBER = 4; - private com.google.protobuf.ByteString tensorContent_; - /** - * optional bytes tensor_content = 4; - * - *
-   * Serialized content from Tensor::AsProtoTensorContent(). This representation
-   * can be used for all tensor types.
-   * 
- */ - public com.google.protobuf.ByteString getTensorContent() { - return tensorContent_; - } - - public static final int FLOAT_VAL_FIELD_NUMBER = 5; - private java.util.List floatVal_; - /** - * repeated float float_val = 5 [packed = true]; - * - *
-   * DT_FLOAT.
-   * 
- */ - public java.util.List - getFloatValList() { - return floatVal_; - } - /** - * repeated float float_val = 5 [packed = true]; - * - *
-   * DT_FLOAT.
-   * 
- */ - public int getFloatValCount() { - return floatVal_.size(); - } - /** - * repeated float float_val = 5 [packed = true]; - * - *
-   * DT_FLOAT.
-   * 
- */ - public float getFloatVal(int index) { - return floatVal_.get(index); - } - private int floatValMemoizedSerializedSize = -1; - - public static final int DOUBLE_VAL_FIELD_NUMBER = 6; - private java.util.List doubleVal_; - /** - * repeated double double_val = 6 [packed = true]; - * - *
-   * DT_DOUBLE.
-   * 
- */ - public java.util.List - getDoubleValList() { - return doubleVal_; - } - /** - * repeated double double_val = 6 [packed = true]; - * - *
-   * DT_DOUBLE.
-   * 
- */ - public int getDoubleValCount() { - return doubleVal_.size(); - } - /** - * repeated double double_val = 6 [packed = true]; - * - *
-   * DT_DOUBLE.
-   * 
- */ - public double getDoubleVal(int index) { - return doubleVal_.get(index); - } - private int doubleValMemoizedSerializedSize = -1; - - public static final int INT_VAL_FIELD_NUMBER = 7; - private java.util.List intVal_; - /** - * repeated int32 int_val = 7 [packed = true]; - * - *
-   * DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
-   * 
- */ - public java.util.List - getIntValList() { - return intVal_; - } - /** - * repeated int32 int_val = 7 [packed = true]; - * - *
-   * DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
-   * 
- */ - public int getIntValCount() { - return intVal_.size(); - } - /** - * repeated int32 int_val = 7 [packed = true]; - * - *
-   * DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
-   * 
- */ - public int getIntVal(int index) { - return intVal_.get(index); - } - private int intValMemoizedSerializedSize = -1; - - public static final int STRING_VAL_FIELD_NUMBER = 8; - private java.util.List stringVal_; - /** - * repeated bytes string_val = 8; - * - *
-   * DT_STRING
-   * 
- */ - public java.util.List - getStringValList() { - return stringVal_; - } - /** - * repeated bytes string_val = 8; - * - *
-   * DT_STRING
-   * 
- */ - public int getStringValCount() { - return stringVal_.size(); - } - /** - * repeated bytes string_val = 8; - * - *
-   * DT_STRING
-   * 
- */ - public com.google.protobuf.ByteString getStringVal(int index) { - return stringVal_.get(index); - } - - public static final int SCOMPLEX_VAL_FIELD_NUMBER = 9; - private java.util.List scomplexVal_; - /** - * repeated float scomplex_val = 9 [packed = true]; - * - *
-   * DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
-   * and imaginary parts of i-th single precision complex.
-   * 
- */ - public java.util.List - getScomplexValList() { - return scomplexVal_; - } - /** - * repeated float scomplex_val = 9 [packed = true]; - * - *
-   * DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
-   * and imaginary parts of i-th single precision complex.
-   * 
- */ - public int getScomplexValCount() { - return scomplexVal_.size(); - } - /** - * repeated float scomplex_val = 9 [packed = true]; - * - *
-   * DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
-   * and imaginary parts of i-th single precision complex.
-   * 
- */ - public float getScomplexVal(int index) { - return scomplexVal_.get(index); - } - private int scomplexValMemoizedSerializedSize = -1; - - public static final int INT64_VAL_FIELD_NUMBER = 10; - private java.util.List int64Val_; - /** - * repeated int64 int64_val = 10 [packed = true]; - * - *
-   * DT_INT64
-   * 
- */ - public java.util.List - getInt64ValList() { - return int64Val_; - } - /** - * repeated int64 int64_val = 10 [packed = true]; - * - *
-   * DT_INT64
-   * 
- */ - public int getInt64ValCount() { - return int64Val_.size(); - } - /** - * repeated int64 int64_val = 10 [packed = true]; - * - *
-   * DT_INT64
-   * 
- */ - public long getInt64Val(int index) { - return int64Val_.get(index); - } - private int int64ValMemoizedSerializedSize = -1; - - public static final int BOOL_VAL_FIELD_NUMBER = 11; - private java.util.List boolVal_; - /** - * repeated bool bool_val = 11 [packed = true]; - * - *
-   * DT_BOOL
-   * 
- */ - public java.util.List - getBoolValList() { - return boolVal_; - } - /** - * repeated bool bool_val = 11 [packed = true]; - * - *
-   * DT_BOOL
-   * 
- */ - public int getBoolValCount() { - return boolVal_.size(); - } - /** - * repeated bool bool_val = 11 [packed = true]; - * - *
-   * DT_BOOL
-   * 
- */ - public boolean getBoolVal(int index) { - return boolVal_.get(index); - } - private int boolValMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (dtype_ != org.tensorflow.framework.DataType.DT_INVALID.getNumber()) { - output.writeEnum(1, dtype_); - } - if (tensorShape_ != null) { - output.writeMessage(2, getTensorShape()); - } - if (versionNumber_ != 0) { - output.writeInt32(3, versionNumber_); - } - if (!tensorContent_.isEmpty()) { - output.writeBytes(4, tensorContent_); - } - if (getFloatValList().size() > 0) { - output.writeRawVarint32(42); - output.writeRawVarint32(floatValMemoizedSerializedSize); - } - for (int i = 0; i < floatVal_.size(); i++) { - output.writeFloatNoTag(floatVal_.get(i)); - } - if (getDoubleValList().size() > 0) { - output.writeRawVarint32(50); - output.writeRawVarint32(doubleValMemoizedSerializedSize); - } - for (int i = 0; i < doubleVal_.size(); i++) { - output.writeDoubleNoTag(doubleVal_.get(i)); - } - if (getIntValList().size() > 0) { - output.writeRawVarint32(58); - output.writeRawVarint32(intValMemoizedSerializedSize); - } - for (int i = 0; i < intVal_.size(); i++) { - output.writeInt32NoTag(intVal_.get(i)); - } - for (int i = 0; i < stringVal_.size(); i++) { - output.writeBytes(8, stringVal_.get(i)); - } - if (getScomplexValList().size() > 0) { - output.writeRawVarint32(74); - output.writeRawVarint32(scomplexValMemoizedSerializedSize); - } - for (int i = 0; i < scomplexVal_.size(); i++) { - output.writeFloatNoTag(scomplexVal_.get(i)); - } - if (getInt64ValList().size() > 0) { - output.writeRawVarint32(82); - output.writeRawVarint32(int64ValMemoizedSerializedSize); - } - for (int i = 0; i < int64Val_.size(); i++) { - output.writeInt64NoTag(int64Val_.get(i)); - } - if (getBoolValList().size() > 0) { - output.writeRawVarint32(90); - output.writeRawVarint32(boolValMemoizedSerializedSize); - } - for (int i = 0; i < boolVal_.size(); i++) { - output.writeBoolNoTag(boolVal_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dtype_ != org.tensorflow.framework.DataType.DT_INVALID.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, dtype_); - } - if (tensorShape_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getTensorShape()); - } - if (versionNumber_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, versionNumber_); - } - if (!tensorContent_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, tensorContent_); - } - { - int dataSize = 0; - dataSize = 4 * getFloatValList().size(); - size += dataSize; - if (!getFloatValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - floatValMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 8 * getDoubleValList().size(); - size += dataSize; - if (!getDoubleValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - doubleValMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < intVal_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(intVal_.get(i)); - } - size += dataSize; - if (!getIntValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - intValMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < stringVal_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(stringVal_.get(i)); - } - size += dataSize; - size += 1 * getStringValList().size(); - } - { - int dataSize = 0; - dataSize = 4 * getScomplexValList().size(); - size += dataSize; - if (!getScomplexValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - scomplexValMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < int64Val_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt64SizeNoTag(int64Val_.get(i)); - } - size += dataSize; - if (!getInt64ValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - int64ValMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 1 * getBoolValList().size(); - size += dataSize; - if (!getBoolValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - boolValMemoizedSerializedSize = dataSize; - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.TensorProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.TensorProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.TensorProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.TensorProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.TensorProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.TensorProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.TensorProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.TensorProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.TensorProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.TensorProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.TensorProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.TensorProto} - * - *
-   * Protocol buffer representing a tensor.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.TensorProto) - org.tensorflow.framework.TensorProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.TensorProtos.internal_static_tensorflow_TensorProto_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.TensorProtos.internal_static_tensorflow_TensorProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.TensorProto.class, org.tensorflow.framework.TensorProto.Builder.class); - } - - // Construct using org.tensorflow.framework.TensorProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - dtype_ = 0; - - if (tensorShapeBuilder_ == null) { - tensorShape_ = null; - } else { - tensorShape_ = null; - tensorShapeBuilder_ = null; - } - versionNumber_ = 0; - - tensorContent_ = com.google.protobuf.ByteString.EMPTY; - - floatVal_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - doubleVal_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - intVal_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - stringVal_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - scomplexVal_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - int64Val_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - boolVal_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.TensorProtos.internal_static_tensorflow_TensorProto_descriptor; - } - - public org.tensorflow.framework.TensorProto getDefaultInstanceForType() { - return org.tensorflow.framework.TensorProto.getDefaultInstance(); - } - - public org.tensorflow.framework.TensorProto build() { - org.tensorflow.framework.TensorProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.TensorProto buildPartial() { - org.tensorflow.framework.TensorProto result = new org.tensorflow.framework.TensorProto(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.dtype_ = dtype_; - if (tensorShapeBuilder_ == null) { - result.tensorShape_ = tensorShape_; - } else { - result.tensorShape_ = tensorShapeBuilder_.build(); - } - result.versionNumber_ = versionNumber_; - result.tensorContent_ = tensorContent_; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - floatVal_ = java.util.Collections.unmodifiableList(floatVal_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.floatVal_ = floatVal_; - if (((bitField0_ & 0x00000020) == 0x00000020)) { - doubleVal_ = java.util.Collections.unmodifiableList(doubleVal_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.doubleVal_ = doubleVal_; - if (((bitField0_ & 0x00000040) == 0x00000040)) { - intVal_ = java.util.Collections.unmodifiableList(intVal_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.intVal_ = intVal_; - if (((bitField0_ & 0x00000080) == 0x00000080)) { - stringVal_ = java.util.Collections.unmodifiableList(stringVal_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.stringVal_ = stringVal_; - if (((bitField0_ & 0x00000100) == 0x00000100)) { - scomplexVal_ = java.util.Collections.unmodifiableList(scomplexVal_); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.scomplexVal_ = scomplexVal_; - if (((bitField0_ & 0x00000200) == 0x00000200)) { - int64Val_ = java.util.Collections.unmodifiableList(int64Val_); - bitField0_ = (bitField0_ & ~0x00000200); - } - result.int64Val_ = int64Val_; - if (((bitField0_ & 0x00000400) == 0x00000400)) { - boolVal_ = java.util.Collections.unmodifiableList(boolVal_); - bitField0_ = (bitField0_ & ~0x00000400); - } - result.boolVal_ = boolVal_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.TensorProto) { - return mergeFrom((org.tensorflow.framework.TensorProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.TensorProto other) { - if (other == org.tensorflow.framework.TensorProto.getDefaultInstance()) return this; - if (other.dtype_ != 0) { - setDtypeValue(other.getDtypeValue()); - } - if (other.hasTensorShape()) { - mergeTensorShape(other.getTensorShape()); - } - if (other.getVersionNumber() != 0) { - setVersionNumber(other.getVersionNumber()); - } - if (other.getTensorContent() != com.google.protobuf.ByteString.EMPTY) { - setTensorContent(other.getTensorContent()); - } - if (!other.floatVal_.isEmpty()) { - if (floatVal_.isEmpty()) { - floatVal_ = other.floatVal_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureFloatValIsMutable(); - floatVal_.addAll(other.floatVal_); - } - onChanged(); - } - if (!other.doubleVal_.isEmpty()) { - if (doubleVal_.isEmpty()) { - doubleVal_ = other.doubleVal_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureDoubleValIsMutable(); - doubleVal_.addAll(other.doubleVal_); - } - onChanged(); - } - if (!other.intVal_.isEmpty()) { - if (intVal_.isEmpty()) { - intVal_ = other.intVal_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureIntValIsMutable(); - intVal_.addAll(other.intVal_); - } - onChanged(); - } - if (!other.stringVal_.isEmpty()) { - if (stringVal_.isEmpty()) { - stringVal_ = other.stringVal_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureStringValIsMutable(); - stringVal_.addAll(other.stringVal_); - } - onChanged(); - } - if (!other.scomplexVal_.isEmpty()) { - if (scomplexVal_.isEmpty()) { - scomplexVal_ = other.scomplexVal_; - bitField0_ = (bitField0_ & ~0x00000100); - } else { - ensureScomplexValIsMutable(); - scomplexVal_.addAll(other.scomplexVal_); - } - onChanged(); - } - if (!other.int64Val_.isEmpty()) { - if (int64Val_.isEmpty()) { - int64Val_ = other.int64Val_; - bitField0_ = (bitField0_ & ~0x00000200); - } else { - ensureInt64ValIsMutable(); - int64Val_.addAll(other.int64Val_); - } - onChanged(); - } - if (!other.boolVal_.isEmpty()) { - if (boolVal_.isEmpty()) { - boolVal_ = other.boolVal_; - bitField0_ = (bitField0_ & ~0x00000400); - } else { - ensureBoolValIsMutable(); - boolVal_.addAll(other.boolVal_); - } - 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.TensorProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.TensorProto) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int dtype_ = 0; - /** - * optional .tensorflow.DataType dtype = 1; - */ - public int getDtypeValue() { - return dtype_; - } - /** - * optional .tensorflow.DataType dtype = 1; - */ - public Builder setDtypeValue(int value) { - dtype_ = value; - onChanged(); - return this; - } - /** - * optional .tensorflow.DataType dtype = 1; - */ - public org.tensorflow.framework.DataType getDtype() { - org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(dtype_); - return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result; - } - /** - * optional .tensorflow.DataType dtype = 1; - */ - public Builder setDtype(org.tensorflow.framework.DataType value) { - if (value == null) { - throw new NullPointerException(); - } - - dtype_ = value.getNumber(); - onChanged(); - return this; - } - /** - * optional .tensorflow.DataType dtype = 1; - */ - public Builder clearDtype() { - - dtype_ = 0; - onChanged(); - return this; - } - - private org.tensorflow.framework.TensorShapeProto tensorShape_ = null; - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> tensorShapeBuilder_; - /** - * optional .tensorflow.TensorShapeProto tensor_shape = 2; - * - *
-     * Shape of the tensor.  TODO(touts): sort out the 0-rank issues.
-     * 
- */ - public boolean hasTensorShape() { - return tensorShapeBuilder_ != null || tensorShape_ != null; - } - /** - * optional .tensorflow.TensorShapeProto tensor_shape = 2; - * - *
-     * Shape of the tensor.  TODO(touts): sort out the 0-rank issues.
-     * 
- */ - public org.tensorflow.framework.TensorShapeProto getTensorShape() { - if (tensorShapeBuilder_ == null) { - return tensorShape_ == null ? org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : tensorShape_; - } else { - return tensorShapeBuilder_.getMessage(); - } - } - /** - * optional .tensorflow.TensorShapeProto tensor_shape = 2; - * - *
-     * Shape of the tensor.  TODO(touts): sort out the 0-rank issues.
-     * 
- */ - 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; - } - /** - * optional .tensorflow.TensorShapeProto tensor_shape = 2; - * - *
-     * Shape of the tensor.  TODO(touts): sort out the 0-rank issues.
-     * 
- */ - public Builder setTensorShape( - org.tensorflow.framework.TensorShapeProto.Builder builderForValue) { - if (tensorShapeBuilder_ == null) { - tensorShape_ = builderForValue.build(); - onChanged(); - } else { - tensorShapeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .tensorflow.TensorShapeProto tensor_shape = 2; - * - *
-     * Shape of the tensor.  TODO(touts): sort out the 0-rank issues.
-     * 
- */ - 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; - } - /** - * optional .tensorflow.TensorShapeProto tensor_shape = 2; - * - *
-     * Shape of the tensor.  TODO(touts): sort out the 0-rank issues.
-     * 
- */ - public Builder clearTensorShape() { - if (tensorShapeBuilder_ == null) { - tensorShape_ = null; - onChanged(); - } else { - tensorShape_ = null; - tensorShapeBuilder_ = null; - } - - return this; - } - /** - * optional .tensorflow.TensorShapeProto tensor_shape = 2; - * - *
-     * Shape of the tensor.  TODO(touts): sort out the 0-rank issues.
-     * 
- */ - public org.tensorflow.framework.TensorShapeProto.Builder getTensorShapeBuilder() { - - onChanged(); - return getTensorShapeFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.TensorShapeProto tensor_shape = 2; - * - *
-     * Shape of the tensor.  TODO(touts): sort out the 0-rank issues.
-     * 
- */ - public org.tensorflow.framework.TensorShapeProtoOrBuilder getTensorShapeOrBuilder() { - if (tensorShapeBuilder_ != null) { - return tensorShapeBuilder_.getMessageOrBuilder(); - } else { - return tensorShape_ == null ? - org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : tensorShape_; - } - } - /** - * optional .tensorflow.TensorShapeProto tensor_shape = 2; - * - *
-     * Shape of the tensor.  TODO(touts): sort out the 0-rank issues.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> - getTensorShapeFieldBuilder() { - if (tensorShapeBuilder_ == null) { - tensorShapeBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>( - getTensorShape(), - getParentForChildren(), - isClean()); - tensorShape_ = null; - } - return tensorShapeBuilder_; - } - - private int versionNumber_ ; - /** - * optional int32 version_number = 3; - * - *
-     * Version number.
-     * In version 0, if the "repeated xxx" representations contain only one
-     * element, that element is repeated to fill the shape.  This makes it easy
-     * to represent a constant Tensor with a single value.
-     * 
- */ - public int getVersionNumber() { - return versionNumber_; - } - /** - * optional int32 version_number = 3; - * - *
-     * Version number.
-     * In version 0, if the "repeated xxx" representations contain only one
-     * element, that element is repeated to fill the shape.  This makes it easy
-     * to represent a constant Tensor with a single value.
-     * 
- */ - public Builder setVersionNumber(int value) { - - versionNumber_ = value; - onChanged(); - return this; - } - /** - * optional int32 version_number = 3; - * - *
-     * Version number.
-     * In version 0, if the "repeated xxx" representations contain only one
-     * element, that element is repeated to fill the shape.  This makes it easy
-     * to represent a constant Tensor with a single value.
-     * 
- */ - public Builder clearVersionNumber() { - - versionNumber_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString tensorContent_ = com.google.protobuf.ByteString.EMPTY; - /** - * optional bytes tensor_content = 4; - * - *
-     * Serialized content from Tensor::AsProtoTensorContent(). This representation
-     * can be used for all tensor types.
-     * 
- */ - public com.google.protobuf.ByteString getTensorContent() { - return tensorContent_; - } - /** - * optional bytes tensor_content = 4; - * - *
-     * Serialized content from Tensor::AsProtoTensorContent(). This representation
-     * can be used for all tensor types.
-     * 
- */ - public Builder setTensorContent(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - tensorContent_ = value; - onChanged(); - return this; - } - /** - * optional bytes tensor_content = 4; - * - *
-     * Serialized content from Tensor::AsProtoTensorContent(). This representation
-     * can be used for all tensor types.
-     * 
- */ - public Builder clearTensorContent() { - - tensorContent_ = getDefaultInstance().getTensorContent(); - onChanged(); - return this; - } - - private java.util.List floatVal_ = java.util.Collections.emptyList(); - private void ensureFloatValIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - floatVal_ = new java.util.ArrayList(floatVal_); - bitField0_ |= 0x00000010; - } - } - /** - * repeated float float_val = 5 [packed = true]; - * - *
-     * DT_FLOAT.
-     * 
- */ - public java.util.List - getFloatValList() { - return java.util.Collections.unmodifiableList(floatVal_); - } - /** - * repeated float float_val = 5 [packed = true]; - * - *
-     * DT_FLOAT.
-     * 
- */ - public int getFloatValCount() { - return floatVal_.size(); - } - /** - * repeated float float_val = 5 [packed = true]; - * - *
-     * DT_FLOAT.
-     * 
- */ - public float getFloatVal(int index) { - return floatVal_.get(index); - } - /** - * repeated float float_val = 5 [packed = true]; - * - *
-     * DT_FLOAT.
-     * 
- */ - public Builder setFloatVal( - int index, float value) { - ensureFloatValIsMutable(); - floatVal_.set(index, value); - onChanged(); - return this; - } - /** - * repeated float float_val = 5 [packed = true]; - * - *
-     * DT_FLOAT.
-     * 
- */ - public Builder addFloatVal(float value) { - ensureFloatValIsMutable(); - floatVal_.add(value); - onChanged(); - return this; - } - /** - * repeated float float_val = 5 [packed = true]; - * - *
-     * DT_FLOAT.
-     * 
- */ - public Builder addAllFloatVal( - java.lang.Iterable values) { - ensureFloatValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, floatVal_); - onChanged(); - return this; - } - /** - * repeated float float_val = 5 [packed = true]; - * - *
-     * DT_FLOAT.
-     * 
- */ - public Builder clearFloatVal() { - floatVal_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - private java.util.List doubleVal_ = java.util.Collections.emptyList(); - private void ensureDoubleValIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - doubleVal_ = new java.util.ArrayList(doubleVal_); - bitField0_ |= 0x00000020; - } - } - /** - * repeated double double_val = 6 [packed = true]; - * - *
-     * DT_DOUBLE.
-     * 
- */ - public java.util.List - getDoubleValList() { - return java.util.Collections.unmodifiableList(doubleVal_); - } - /** - * repeated double double_val = 6 [packed = true]; - * - *
-     * DT_DOUBLE.
-     * 
- */ - public int getDoubleValCount() { - return doubleVal_.size(); - } - /** - * repeated double double_val = 6 [packed = true]; - * - *
-     * DT_DOUBLE.
-     * 
- */ - public double getDoubleVal(int index) { - return doubleVal_.get(index); - } - /** - * repeated double double_val = 6 [packed = true]; - * - *
-     * DT_DOUBLE.
-     * 
- */ - public Builder setDoubleVal( - int index, double value) { - ensureDoubleValIsMutable(); - doubleVal_.set(index, value); - onChanged(); - return this; - } - /** - * repeated double double_val = 6 [packed = true]; - * - *
-     * DT_DOUBLE.
-     * 
- */ - public Builder addDoubleVal(double value) { - ensureDoubleValIsMutable(); - doubleVal_.add(value); - onChanged(); - return this; - } - /** - * repeated double double_val = 6 [packed = true]; - * - *
-     * DT_DOUBLE.
-     * 
- */ - public Builder addAllDoubleVal( - java.lang.Iterable values) { - ensureDoubleValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, doubleVal_); - onChanged(); - return this; - } - /** - * repeated double double_val = 6 [packed = true]; - * - *
-     * DT_DOUBLE.
-     * 
- */ - public Builder clearDoubleVal() { - doubleVal_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private java.util.List intVal_ = java.util.Collections.emptyList(); - private void ensureIntValIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - intVal_ = new java.util.ArrayList(intVal_); - bitField0_ |= 0x00000040; - } - } - /** - * repeated int32 int_val = 7 [packed = true]; - * - *
-     * DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
-     * 
- */ - public java.util.List - getIntValList() { - return java.util.Collections.unmodifiableList(intVal_); - } - /** - * repeated int32 int_val = 7 [packed = true]; - * - *
-     * DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
-     * 
- */ - public int getIntValCount() { - return intVal_.size(); - } - /** - * repeated int32 int_val = 7 [packed = true]; - * - *
-     * DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
-     * 
- */ - public int getIntVal(int index) { - return intVal_.get(index); - } - /** - * repeated int32 int_val = 7 [packed = true]; - * - *
-     * DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
-     * 
- */ - public Builder setIntVal( - int index, int value) { - ensureIntValIsMutable(); - intVal_.set(index, value); - onChanged(); - return this; - } - /** - * repeated int32 int_val = 7 [packed = true]; - * - *
-     * DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
-     * 
- */ - public Builder addIntVal(int value) { - ensureIntValIsMutable(); - intVal_.add(value); - onChanged(); - return this; - } - /** - * repeated int32 int_val = 7 [packed = true]; - * - *
-     * DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
-     * 
- */ - public Builder addAllIntVal( - java.lang.Iterable values) { - ensureIntValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, intVal_); - onChanged(); - return this; - } - /** - * repeated int32 int_val = 7 [packed = true]; - * - *
-     * DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
-     * 
- */ - public Builder clearIntVal() { - intVal_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - private java.util.List stringVal_ = java.util.Collections.emptyList(); - private void ensureStringValIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { - stringVal_ = new java.util.ArrayList(stringVal_); - bitField0_ |= 0x00000080; - } - } - /** - * repeated bytes string_val = 8; - * - *
-     * DT_STRING
-     * 
- */ - public java.util.List - getStringValList() { - return java.util.Collections.unmodifiableList(stringVal_); - } - /** - * repeated bytes string_val = 8; - * - *
-     * DT_STRING
-     * 
- */ - public int getStringValCount() { - return stringVal_.size(); - } - /** - * repeated bytes string_val = 8; - * - *
-     * DT_STRING
-     * 
- */ - public com.google.protobuf.ByteString getStringVal(int index) { - return stringVal_.get(index); - } - /** - * repeated bytes string_val = 8; - * - *
-     * DT_STRING
-     * 
- */ - public Builder setStringVal( - int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureStringValIsMutable(); - stringVal_.set(index, value); - onChanged(); - return this; - } - /** - * repeated bytes string_val = 8; - * - *
-     * DT_STRING
-     * 
- */ - public Builder addStringVal(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureStringValIsMutable(); - stringVal_.add(value); - onChanged(); - return this; - } - /** - * repeated bytes string_val = 8; - * - *
-     * DT_STRING
-     * 
- */ - public Builder addAllStringVal( - java.lang.Iterable values) { - ensureStringValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, stringVal_); - onChanged(); - return this; - } - /** - * repeated bytes string_val = 8; - * - *
-     * DT_STRING
-     * 
- */ - public Builder clearStringVal() { - stringVal_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - - private java.util.List scomplexVal_ = java.util.Collections.emptyList(); - private void ensureScomplexValIsMutable() { - if (!((bitField0_ & 0x00000100) == 0x00000100)) { - scomplexVal_ = new java.util.ArrayList(scomplexVal_); - bitField0_ |= 0x00000100; - } - } - /** - * repeated float scomplex_val = 9 [packed = true]; - * - *
-     * DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
-     * and imaginary parts of i-th single precision complex.
-     * 
- */ - public java.util.List - getScomplexValList() { - return java.util.Collections.unmodifiableList(scomplexVal_); - } - /** - * repeated float scomplex_val = 9 [packed = true]; - * - *
-     * DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
-     * and imaginary parts of i-th single precision complex.
-     * 
- */ - public int getScomplexValCount() { - return scomplexVal_.size(); - } - /** - * repeated float scomplex_val = 9 [packed = true]; - * - *
-     * DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
-     * and imaginary parts of i-th single precision complex.
-     * 
- */ - public float getScomplexVal(int index) { - return scomplexVal_.get(index); - } - /** - * repeated float scomplex_val = 9 [packed = true]; - * - *
-     * DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
-     * and imaginary parts of i-th single precision complex.
-     * 
- */ - public Builder setScomplexVal( - int index, float value) { - ensureScomplexValIsMutable(); - scomplexVal_.set(index, value); - onChanged(); - return this; - } - /** - * repeated float scomplex_val = 9 [packed = true]; - * - *
-     * DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
-     * and imaginary parts of i-th single precision complex.
-     * 
- */ - public Builder addScomplexVal(float value) { - ensureScomplexValIsMutable(); - scomplexVal_.add(value); - onChanged(); - return this; - } - /** - * repeated float scomplex_val = 9 [packed = true]; - * - *
-     * DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
-     * and imaginary parts of i-th single precision complex.
-     * 
- */ - public Builder addAllScomplexVal( - java.lang.Iterable values) { - ensureScomplexValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, scomplexVal_); - onChanged(); - return this; - } - /** - * repeated float scomplex_val = 9 [packed = true]; - * - *
-     * DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
-     * and imaginary parts of i-th single precision complex.
-     * 
- */ - public Builder clearScomplexVal() { - scomplexVal_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - - private java.util.List int64Val_ = java.util.Collections.emptyList(); - private void ensureInt64ValIsMutable() { - if (!((bitField0_ & 0x00000200) == 0x00000200)) { - int64Val_ = new java.util.ArrayList(int64Val_); - bitField0_ |= 0x00000200; - } - } - /** - * repeated int64 int64_val = 10 [packed = true]; - * - *
-     * DT_INT64
-     * 
- */ - public java.util.List - getInt64ValList() { - return java.util.Collections.unmodifiableList(int64Val_); - } - /** - * repeated int64 int64_val = 10 [packed = true]; - * - *
-     * DT_INT64
-     * 
- */ - public int getInt64ValCount() { - return int64Val_.size(); - } - /** - * repeated int64 int64_val = 10 [packed = true]; - * - *
-     * DT_INT64
-     * 
- */ - public long getInt64Val(int index) { - return int64Val_.get(index); - } - /** - * repeated int64 int64_val = 10 [packed = true]; - * - *
-     * DT_INT64
-     * 
- */ - public Builder setInt64Val( - int index, long value) { - ensureInt64ValIsMutable(); - int64Val_.set(index, value); - onChanged(); - return this; - } - /** - * repeated int64 int64_val = 10 [packed = true]; - * - *
-     * DT_INT64
-     * 
- */ - public Builder addInt64Val(long value) { - ensureInt64ValIsMutable(); - int64Val_.add(value); - onChanged(); - return this; - } - /** - * repeated int64 int64_val = 10 [packed = true]; - * - *
-     * DT_INT64
-     * 
- */ - public Builder addAllInt64Val( - java.lang.Iterable values) { - ensureInt64ValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, int64Val_); - onChanged(); - return this; - } - /** - * repeated int64 int64_val = 10 [packed = true]; - * - *
-     * DT_INT64
-     * 
- */ - public Builder clearInt64Val() { - int64Val_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - return this; - } - - private java.util.List boolVal_ = java.util.Collections.emptyList(); - private void ensureBoolValIsMutable() { - if (!((bitField0_ & 0x00000400) == 0x00000400)) { - boolVal_ = new java.util.ArrayList(boolVal_); - bitField0_ |= 0x00000400; - } - } - /** - * repeated bool bool_val = 11 [packed = true]; - * - *
-     * DT_BOOL
-     * 
- */ - public java.util.List - getBoolValList() { - return java.util.Collections.unmodifiableList(boolVal_); - } - /** - * repeated bool bool_val = 11 [packed = true]; - * - *
-     * DT_BOOL
-     * 
- */ - public int getBoolValCount() { - return boolVal_.size(); - } - /** - * repeated bool bool_val = 11 [packed = true]; - * - *
-     * DT_BOOL
-     * 
- */ - public boolean getBoolVal(int index) { - return boolVal_.get(index); - } - /** - * repeated bool bool_val = 11 [packed = true]; - * - *
-     * DT_BOOL
-     * 
- */ - public Builder setBoolVal( - int index, boolean value) { - ensureBoolValIsMutable(); - boolVal_.set(index, value); - onChanged(); - return this; - } - /** - * repeated bool bool_val = 11 [packed = true]; - * - *
-     * DT_BOOL
-     * 
- */ - public Builder addBoolVal(boolean value) { - ensureBoolValIsMutable(); - boolVal_.add(value); - onChanged(); - return this; - } - /** - * repeated bool bool_val = 11 [packed = true]; - * - *
-     * DT_BOOL
-     * 
- */ - public Builder addAllBoolVal( - java.lang.Iterable values) { - ensureBoolValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, boolVal_); - onChanged(); - return this; - } - /** - * repeated bool bool_val = 11 [packed = true]; - * - *
-     * DT_BOOL
-     * 
- */ - public Builder clearBoolVal() { - boolVal_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); - 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.TensorProto) - } - - // @@protoc_insertion_point(class_scope:tensorflow.TensorProto) - private static final org.tensorflow.framework.TensorProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.TensorProto(); - } - - public static org.tensorflow.framework.TensorProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public TensorProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new TensorProto(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.TensorProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/TensorProtoOrBuilder.java b/src/main/java/org/tensorflow/framework/TensorProtoOrBuilder.java deleted file mode 100644 index 944c9a0..0000000 --- a/src/main/java/org/tensorflow/framework/TensorProtoOrBuilder.java +++ /dev/null @@ -1,243 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/tensor.proto - -package org.tensorflow.framework; - -public interface TensorProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.TensorProto) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .tensorflow.DataType dtype = 1; - */ - int getDtypeValue(); - /** - * optional .tensorflow.DataType dtype = 1; - */ - org.tensorflow.framework.DataType getDtype(); - - /** - * optional .tensorflow.TensorShapeProto tensor_shape = 2; - * - *
-   * Shape of the tensor.  TODO(touts): sort out the 0-rank issues.
-   * 
- */ - boolean hasTensorShape(); - /** - * optional .tensorflow.TensorShapeProto tensor_shape = 2; - * - *
-   * Shape of the tensor.  TODO(touts): sort out the 0-rank issues.
-   * 
- */ - org.tensorflow.framework.TensorShapeProto getTensorShape(); - /** - * optional .tensorflow.TensorShapeProto tensor_shape = 2; - * - *
-   * Shape of the tensor.  TODO(touts): sort out the 0-rank issues.
-   * 
- */ - org.tensorflow.framework.TensorShapeProtoOrBuilder getTensorShapeOrBuilder(); - - /** - * optional int32 version_number = 3; - * - *
-   * Version number.
-   * In version 0, if the "repeated xxx" representations contain only one
-   * element, that element is repeated to fill the shape.  This makes it easy
-   * to represent a constant Tensor with a single value.
-   * 
- */ - int getVersionNumber(); - - /** - * optional bytes tensor_content = 4; - * - *
-   * Serialized content from Tensor::AsProtoTensorContent(). This representation
-   * can be used for all tensor types.
-   * 
- */ - com.google.protobuf.ByteString getTensorContent(); - - /** - * repeated float float_val = 5 [packed = true]; - * - *
-   * DT_FLOAT.
-   * 
- */ - java.util.List getFloatValList(); - /** - * repeated float float_val = 5 [packed = true]; - * - *
-   * DT_FLOAT.
-   * 
- */ - int getFloatValCount(); - /** - * repeated float float_val = 5 [packed = true]; - * - *
-   * DT_FLOAT.
-   * 
- */ - float getFloatVal(int index); - - /** - * repeated double double_val = 6 [packed = true]; - * - *
-   * DT_DOUBLE.
-   * 
- */ - java.util.List getDoubleValList(); - /** - * repeated double double_val = 6 [packed = true]; - * - *
-   * DT_DOUBLE.
-   * 
- */ - int getDoubleValCount(); - /** - * repeated double double_val = 6 [packed = true]; - * - *
-   * DT_DOUBLE.
-   * 
- */ - double getDoubleVal(int index); - - /** - * repeated int32 int_val = 7 [packed = true]; - * - *
-   * DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
-   * 
- */ - java.util.List getIntValList(); - /** - * repeated int32 int_val = 7 [packed = true]; - * - *
-   * DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
-   * 
- */ - int getIntValCount(); - /** - * repeated int32 int_val = 7 [packed = true]; - * - *
-   * DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
-   * 
- */ - int getIntVal(int index); - - /** - * repeated bytes string_val = 8; - * - *
-   * DT_STRING
-   * 
- */ - java.util.List getStringValList(); - /** - * repeated bytes string_val = 8; - * - *
-   * DT_STRING
-   * 
- */ - int getStringValCount(); - /** - * repeated bytes string_val = 8; - * - *
-   * DT_STRING
-   * 
- */ - com.google.protobuf.ByteString getStringVal(int index); - - /** - * repeated float scomplex_val = 9 [packed = true]; - * - *
-   * DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
-   * and imaginary parts of i-th single precision complex.
-   * 
- */ - java.util.List getScomplexValList(); - /** - * repeated float scomplex_val = 9 [packed = true]; - * - *
-   * DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
-   * and imaginary parts of i-th single precision complex.
-   * 
- */ - int getScomplexValCount(); - /** - * repeated float scomplex_val = 9 [packed = true]; - * - *
-   * DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
-   * and imaginary parts of i-th single precision complex.
-   * 
- */ - float getScomplexVal(int index); - - /** - * repeated int64 int64_val = 10 [packed = true]; - * - *
-   * DT_INT64
-   * 
- */ - java.util.List getInt64ValList(); - /** - * repeated int64 int64_val = 10 [packed = true]; - * - *
-   * DT_INT64
-   * 
- */ - int getInt64ValCount(); - /** - * repeated int64 int64_val = 10 [packed = true]; - * - *
-   * DT_INT64
-   * 
- */ - long getInt64Val(int index); - - /** - * repeated bool bool_val = 11 [packed = true]; - * - *
-   * DT_BOOL
-   * 
- */ - java.util.List getBoolValList(); - /** - * repeated bool bool_val = 11 [packed = true]; - * - *
-   * DT_BOOL
-   * 
- */ - int getBoolValCount(); - /** - * repeated bool bool_val = 11 [packed = true]; - * - *
-   * DT_BOOL
-   * 
- */ - boolean getBoolVal(int index); -} diff --git a/src/main/java/org/tensorflow/framework/TensorProtos.java b/src/main/java/org/tensorflow/framework/TensorProtos.java deleted file mode 100644 index ff0916d..0000000 --- a/src/main/java/org/tensorflow/framework/TensorProtos.java +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/tensor.proto - -package org.tensorflow.framework; - -public final class TensorProtos { - private TensorProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_TensorProto_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_TensorProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n&tensorflow/core/framework/tensor.proto" + - "\022\ntensorflow\032,tensorflow/core/framework/" + - "tensor_shape.proto\032%tensorflow/core/fram" + - "ework/types.proto\"\265\002\n\013TensorProto\022#\n\005dty" + - "pe\030\001 \001(\0162\024.tensorflow.DataType\0222\n\014tensor" + - "_shape\030\002 \001(\0132\034.tensorflow.TensorShapePro" + - "to\022\026\n\016version_number\030\003 \001(\005\022\026\n\016tensor_con" + - "tent\030\004 \001(\014\022\025\n\tfloat_val\030\005 \003(\002B\002\020\001\022\026\n\ndou" + - "ble_val\030\006 \003(\001B\002\020\001\022\023\n\007int_val\030\007 \003(\005B\002\020\001\022\022" + - "\n\nstring_val\030\010 \003(\014\022\030\n\014scomplex_val\030\t \003(\002", - "B\002\020\001\022\025\n\tint64_val\030\n \003(\003B\002\020\001\022\024\n\010bool_val\030" + - "\013 \003(\010B\002\020\001B*\n\030org.tensorflow.frameworkB\014T" + - "ensorProtosP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - org.tensorflow.framework.TensorShapeProtos.getDescriptor(), - org.tensorflow.framework.TypesProtos.getDescriptor(), - }, assigner); - internal_static_tensorflow_TensorProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_tensorflow_TensorProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_TensorProto_descriptor, - new java.lang.String[] { "Dtype", "TensorShape", "VersionNumber", "TensorContent", "FloatVal", "DoubleVal", "IntVal", "StringVal", "ScomplexVal", "Int64Val", "BoolVal", }); - org.tensorflow.framework.TensorShapeProtos.getDescriptor(); - org.tensorflow.framework.TypesProtos.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/org/tensorflow/framework/TensorShapeProto.java b/src/main/java/org/tensorflow/framework/TensorShapeProto.java deleted file mode 100644 index c3ff1a5..0000000 --- a/src/main/java/org/tensorflow/framework/TensorShapeProto.java +++ /dev/null @@ -1,1631 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/tensor_shape.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.TensorShapeProto} - * - *
- * Dimensions of a tensor.
- * 
- */ -public final class TensorShapeProto extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.TensorShapeProto) - TensorShapeProtoOrBuilder { - // Use TensorShapeProto.newBuilder() to construct. - private TensorShapeProto(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TensorShapeProto() { - dim_ = java.util.Collections.emptyList(); - unknownRank_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private TensorShapeProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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 18: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - dim_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - dim_.add(input.readMessage(org.tensorflow.framework.TensorShapeProto.Dim.parser(), extensionRegistry)); - break; - } - case 24: { - - unknownRank_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - dim_ = java.util.Collections.unmodifiableList(dim_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.TensorShapeProto.class, org.tensorflow.framework.TensorShapeProto.Builder.class); - } - - public interface DimOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.TensorShapeProto.Dim) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int64 size = 1; - * - *
-     * Size of the tensor in that dimension.
-     * This value must be >= -1, but values of -1 are reserved for "unknown"
-     * shapes (values of -1 mean "unknown" dimension).  Certain wrappers
-     * that work with TensorShapeProto may fail at runtime when deserializing
-     * a TensorShapeProto containing a dim value of -1.
-     * 
- */ - long getSize(); - - /** - * optional string name = 2; - * - *
-     * Optional name of the tensor dimension.
-     * 
- */ - java.lang.String getName(); - /** - * optional string name = 2; - * - *
-     * Optional name of the tensor dimension.
-     * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - } - /** - * Protobuf type {@code tensorflow.TensorShapeProto.Dim} - * - *
-   * One dimension of the tensor.
-   * 
- */ - public static final class Dim extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.TensorShapeProto.Dim) - DimOrBuilder { - // Use Dim.newBuilder() to construct. - private Dim(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Dim() { - size_ = 0L; - name_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Dim( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 8: { - - size_ = input.readInt64(); - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_Dim_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_Dim_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.TensorShapeProto.Dim.class, org.tensorflow.framework.TensorShapeProto.Dim.Builder.class); - } - - public static final int SIZE_FIELD_NUMBER = 1; - private long size_; - /** - * optional int64 size = 1; - * - *
-     * Size of the tensor in that dimension.
-     * This value must be >= -1, but values of -1 are reserved for "unknown"
-     * shapes (values of -1 mean "unknown" dimension).  Certain wrappers
-     * that work with TensorShapeProto may fail at runtime when deserializing
-     * a TensorShapeProto containing a dim value of -1.
-     * 
- */ - public long getSize() { - return size_; - } - - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * optional string name = 2; - * - *
-     * Optional name of the tensor dimension.
-     * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * optional string name = 2; - * - *
-     * Optional name of the tensor dimension.
-     * 
- */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = 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 (size_ != 0L) { - output.writeInt64(1, size_); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, name_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (size_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, size_); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, name_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.TensorShapeProto.Dim 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.TensorShapeProto.Dim parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.TensorShapeProto.Dim parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.TensorShapeProto.Dim parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.TensorShapeProto.Dim parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.TensorShapeProto.Dim prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.TensorShapeProto.Dim} - * - *
-     * One dimension of the tensor.
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.TensorShapeProto.Dim) - org.tensorflow.framework.TensorShapeProto.DimOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_Dim_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_Dim_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.TensorShapeProto.Dim.class, org.tensorflow.framework.TensorShapeProto.Dim.Builder.class); - } - - // Construct using org.tensorflow.framework.TensorShapeProto.Dim.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - size_ = 0L; - - name_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_Dim_descriptor; - } - - public org.tensorflow.framework.TensorShapeProto.Dim getDefaultInstanceForType() { - return org.tensorflow.framework.TensorShapeProto.Dim.getDefaultInstance(); - } - - public org.tensorflow.framework.TensorShapeProto.Dim build() { - org.tensorflow.framework.TensorShapeProto.Dim result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.TensorShapeProto.Dim buildPartial() { - org.tensorflow.framework.TensorShapeProto.Dim result = new org.tensorflow.framework.TensorShapeProto.Dim(this); - result.size_ = size_; - result.name_ = name_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.TensorShapeProto.Dim) { - return mergeFrom((org.tensorflow.framework.TensorShapeProto.Dim)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.TensorShapeProto.Dim other) { - if (other == org.tensorflow.framework.TensorShapeProto.Dim.getDefaultInstance()) return this; - if (other.getSize() != 0L) { - setSize(other.getSize()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - 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.TensorShapeProto.Dim parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.TensorShapeProto.Dim) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long size_ ; - /** - * optional int64 size = 1; - * - *
-       * Size of the tensor in that dimension.
-       * This value must be >= -1, but values of -1 are reserved for "unknown"
-       * shapes (values of -1 mean "unknown" dimension).  Certain wrappers
-       * that work with TensorShapeProto may fail at runtime when deserializing
-       * a TensorShapeProto containing a dim value of -1.
-       * 
- */ - public long getSize() { - return size_; - } - /** - * optional int64 size = 1; - * - *
-       * Size of the tensor in that dimension.
-       * This value must be >= -1, but values of -1 are reserved for "unknown"
-       * shapes (values of -1 mean "unknown" dimension).  Certain wrappers
-       * that work with TensorShapeProto may fail at runtime when deserializing
-       * a TensorShapeProto containing a dim value of -1.
-       * 
- */ - public Builder setSize(long value) { - - size_ = value; - onChanged(); - return this; - } - /** - * optional int64 size = 1; - * - *
-       * Size of the tensor in that dimension.
-       * This value must be >= -1, but values of -1 are reserved for "unknown"
-       * shapes (values of -1 mean "unknown" dimension).  Certain wrappers
-       * that work with TensorShapeProto may fail at runtime when deserializing
-       * a TensorShapeProto containing a dim value of -1.
-       * 
- */ - public Builder clearSize() { - - size_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - * optional string name = 2; - * - *
-       * Optional name of the tensor dimension.
-       * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 2; - * - *
-       * Optional name of the tensor dimension.
-       * 
- */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string name = 2; - * - *
-       * Optional name of the tensor dimension.
-       * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 2; - * - *
-       * Optional name of the tensor dimension.
-       * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 2; - * - *
-       * Optional name of the tensor dimension.
-       * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = 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.TensorShapeProto.Dim) - } - - // @@protoc_insertion_point(class_scope:tensorflow.TensorShapeProto.Dim) - private static final org.tensorflow.framework.TensorShapeProto.Dim DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.TensorShapeProto.Dim(); - } - - public static org.tensorflow.framework.TensorShapeProto.Dim getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Dim parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Dim(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.TensorShapeProto.Dim getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int DIM_FIELD_NUMBER = 2; - private java.util.List dim_; - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-   * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-   * for a 30 x 40 2D tensor.  If an entry has size -1, this
-   * corresponds to a dimension of unknown size. The names are
-   * optional.
-   * The order of entries in "dim" matters: It indicates the layout of the
-   * values in the tensor in-memory representation.
-   * The first entry in "dim" is the outermost dimension used to layout the
-   * values, the last entry is the innermost dimension.  This matches the
-   * in-memory layout of RowMajor Eigen tensors.
-   * If "dim.size()" > 0, "unknown_rank" must be false.
-   * 
- */ - public java.util.List getDimList() { - return dim_; - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-   * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-   * for a 30 x 40 2D tensor.  If an entry has size -1, this
-   * corresponds to a dimension of unknown size. The names are
-   * optional.
-   * The order of entries in "dim" matters: It indicates the layout of the
-   * values in the tensor in-memory representation.
-   * The first entry in "dim" is the outermost dimension used to layout the
-   * values, the last entry is the innermost dimension.  This matches the
-   * in-memory layout of RowMajor Eigen tensors.
-   * If "dim.size()" > 0, "unknown_rank" must be false.
-   * 
- */ - public java.util.List - getDimOrBuilderList() { - return dim_; - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-   * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-   * for a 30 x 40 2D tensor.  If an entry has size -1, this
-   * corresponds to a dimension of unknown size. The names are
-   * optional.
-   * The order of entries in "dim" matters: It indicates the layout of the
-   * values in the tensor in-memory representation.
-   * The first entry in "dim" is the outermost dimension used to layout the
-   * values, the last entry is the innermost dimension.  This matches the
-   * in-memory layout of RowMajor Eigen tensors.
-   * If "dim.size()" > 0, "unknown_rank" must be false.
-   * 
- */ - public int getDimCount() { - return dim_.size(); - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-   * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-   * for a 30 x 40 2D tensor.  If an entry has size -1, this
-   * corresponds to a dimension of unknown size. The names are
-   * optional.
-   * The order of entries in "dim" matters: It indicates the layout of the
-   * values in the tensor in-memory representation.
-   * The first entry in "dim" is the outermost dimension used to layout the
-   * values, the last entry is the innermost dimension.  This matches the
-   * in-memory layout of RowMajor Eigen tensors.
-   * If "dim.size()" > 0, "unknown_rank" must be false.
-   * 
- */ - public org.tensorflow.framework.TensorShapeProto.Dim getDim(int index) { - return dim_.get(index); - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-   * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-   * for a 30 x 40 2D tensor.  If an entry has size -1, this
-   * corresponds to a dimension of unknown size. The names are
-   * optional.
-   * The order of entries in "dim" matters: It indicates the layout of the
-   * values in the tensor in-memory representation.
-   * The first entry in "dim" is the outermost dimension used to layout the
-   * values, the last entry is the innermost dimension.  This matches the
-   * in-memory layout of RowMajor Eigen tensors.
-   * If "dim.size()" > 0, "unknown_rank" must be false.
-   * 
- */ - public org.tensorflow.framework.TensorShapeProto.DimOrBuilder getDimOrBuilder( - int index) { - return dim_.get(index); - } - - public static final int UNKNOWN_RANK_FIELD_NUMBER = 3; - private boolean unknownRank_; - /** - * optional bool unknown_rank = 3; - * - *
-   * If true, the number of dimensions in the shape is unknown.
-   * If true, "dim.size()" must be 0.
-   * 
- */ - public boolean getUnknownRank() { - return unknownRank_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < dim_.size(); i++) { - output.writeMessage(2, dim_.get(i)); - } - if (unknownRank_ != false) { - output.writeBool(3, unknownRank_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < dim_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, dim_.get(i)); - } - if (unknownRank_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, unknownRank_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.TensorShapeProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.TensorShapeProto 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.TensorShapeProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.TensorShapeProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.TensorShapeProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.TensorShapeProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.TensorShapeProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.TensorShapeProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.TensorShapeProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.TensorShapeProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.TensorShapeProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.TensorShapeProto} - * - *
-   * Dimensions of a tensor.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.TensorShapeProto) - org.tensorflow.framework.TensorShapeProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.TensorShapeProto.class, org.tensorflow.framework.TensorShapeProto.Builder.class); - } - - // Construct using org.tensorflow.framework.TensorShapeProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getDimFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (dimBuilder_ == null) { - dim_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - dimBuilder_.clear(); - } - unknownRank_ = false; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_descriptor; - } - - public org.tensorflow.framework.TensorShapeProto getDefaultInstanceForType() { - return org.tensorflow.framework.TensorShapeProto.getDefaultInstance(); - } - - public org.tensorflow.framework.TensorShapeProto build() { - org.tensorflow.framework.TensorShapeProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.TensorShapeProto buildPartial() { - org.tensorflow.framework.TensorShapeProto result = new org.tensorflow.framework.TensorShapeProto(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (dimBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - dim_ = java.util.Collections.unmodifiableList(dim_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.dim_ = dim_; - } else { - result.dim_ = dimBuilder_.build(); - } - result.unknownRank_ = unknownRank_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.TensorShapeProto) { - return mergeFrom((org.tensorflow.framework.TensorShapeProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.TensorShapeProto other) { - if (other == org.tensorflow.framework.TensorShapeProto.getDefaultInstance()) return this; - if (dimBuilder_ == null) { - if (!other.dim_.isEmpty()) { - if (dim_.isEmpty()) { - dim_ = other.dim_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDimIsMutable(); - dim_.addAll(other.dim_); - } - onChanged(); - } - } else { - if (!other.dim_.isEmpty()) { - if (dimBuilder_.isEmpty()) { - dimBuilder_.dispose(); - dimBuilder_ = null; - dim_ = other.dim_; - bitField0_ = (bitField0_ & ~0x00000001); - dimBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getDimFieldBuilder() : null; - } else { - dimBuilder_.addAllMessages(other.dim_); - } - } - } - if (other.getUnknownRank() != false) { - setUnknownRank(other.getUnknownRank()); - } - 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.TensorShapeProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.TensorShapeProto) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List dim_ = - java.util.Collections.emptyList(); - private void ensureDimIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - dim_ = new java.util.ArrayList(dim_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.TensorShapeProto.Dim, org.tensorflow.framework.TensorShapeProto.Dim.Builder, org.tensorflow.framework.TensorShapeProto.DimOrBuilder> dimBuilder_; - - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public java.util.List getDimList() { - if (dimBuilder_ == null) { - return java.util.Collections.unmodifiableList(dim_); - } else { - return dimBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public int getDimCount() { - if (dimBuilder_ == null) { - return dim_.size(); - } else { - return dimBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public org.tensorflow.framework.TensorShapeProto.Dim getDim(int index) { - if (dimBuilder_ == null) { - return dim_.get(index); - } else { - return dimBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public Builder setDim( - int index, org.tensorflow.framework.TensorShapeProto.Dim value) { - if (dimBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDimIsMutable(); - dim_.set(index, value); - onChanged(); - } else { - dimBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public Builder setDim( - int index, org.tensorflow.framework.TensorShapeProto.Dim.Builder builderForValue) { - if (dimBuilder_ == null) { - ensureDimIsMutable(); - dim_.set(index, builderForValue.build()); - onChanged(); - } else { - dimBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public Builder addDim(org.tensorflow.framework.TensorShapeProto.Dim value) { - if (dimBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDimIsMutable(); - dim_.add(value); - onChanged(); - } else { - dimBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public Builder addDim( - int index, org.tensorflow.framework.TensorShapeProto.Dim value) { - if (dimBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDimIsMutable(); - dim_.add(index, value); - onChanged(); - } else { - dimBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public Builder addDim( - org.tensorflow.framework.TensorShapeProto.Dim.Builder builderForValue) { - if (dimBuilder_ == null) { - ensureDimIsMutable(); - dim_.add(builderForValue.build()); - onChanged(); - } else { - dimBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public Builder addDim( - int index, org.tensorflow.framework.TensorShapeProto.Dim.Builder builderForValue) { - if (dimBuilder_ == null) { - ensureDimIsMutable(); - dim_.add(index, builderForValue.build()); - onChanged(); - } else { - dimBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public Builder addAllDim( - java.lang.Iterable values) { - if (dimBuilder_ == null) { - ensureDimIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, dim_); - onChanged(); - } else { - dimBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public Builder clearDim() { - if (dimBuilder_ == null) { - dim_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - dimBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public Builder removeDim(int index) { - if (dimBuilder_ == null) { - ensureDimIsMutable(); - dim_.remove(index); - onChanged(); - } else { - dimBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public org.tensorflow.framework.TensorShapeProto.Dim.Builder getDimBuilder( - int index) { - return getDimFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public org.tensorflow.framework.TensorShapeProto.DimOrBuilder getDimOrBuilder( - int index) { - if (dimBuilder_ == null) { - return dim_.get(index); } else { - return dimBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public java.util.List - getDimOrBuilderList() { - if (dimBuilder_ != null) { - return dimBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(dim_); - } - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public org.tensorflow.framework.TensorShapeProto.Dim.Builder addDimBuilder() { - return getDimFieldBuilder().addBuilder( - org.tensorflow.framework.TensorShapeProto.Dim.getDefaultInstance()); - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public org.tensorflow.framework.TensorShapeProto.Dim.Builder addDimBuilder( - int index) { - return getDimFieldBuilder().addBuilder( - index, org.tensorflow.framework.TensorShapeProto.Dim.getDefaultInstance()); - } - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-     * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-     * for a 30 x 40 2D tensor.  If an entry has size -1, this
-     * corresponds to a dimension of unknown size. The names are
-     * optional.
-     * The order of entries in "dim" matters: It indicates the layout of the
-     * values in the tensor in-memory representation.
-     * The first entry in "dim" is the outermost dimension used to layout the
-     * values, the last entry is the innermost dimension.  This matches the
-     * in-memory layout of RowMajor Eigen tensors.
-     * If "dim.size()" > 0, "unknown_rank" must be false.
-     * 
- */ - public java.util.List - getDimBuilderList() { - return getDimFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.TensorShapeProto.Dim, org.tensorflow.framework.TensorShapeProto.Dim.Builder, org.tensorflow.framework.TensorShapeProto.DimOrBuilder> - getDimFieldBuilder() { - if (dimBuilder_ == null) { - dimBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.TensorShapeProto.Dim, org.tensorflow.framework.TensorShapeProto.Dim.Builder, org.tensorflow.framework.TensorShapeProto.DimOrBuilder>( - dim_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - dim_ = null; - } - return dimBuilder_; - } - - private boolean unknownRank_ ; - /** - * optional bool unknown_rank = 3; - * - *
-     * If true, the number of dimensions in the shape is unknown.
-     * If true, "dim.size()" must be 0.
-     * 
- */ - public boolean getUnknownRank() { - return unknownRank_; - } - /** - * optional bool unknown_rank = 3; - * - *
-     * If true, the number of dimensions in the shape is unknown.
-     * If true, "dim.size()" must be 0.
-     * 
- */ - public Builder setUnknownRank(boolean value) { - - unknownRank_ = value; - onChanged(); - return this; - } - /** - * optional bool unknown_rank = 3; - * - *
-     * If true, the number of dimensions in the shape is unknown.
-     * If true, "dim.size()" must be 0.
-     * 
- */ - public Builder clearUnknownRank() { - - unknownRank_ = false; - 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.TensorShapeProto) - } - - // @@protoc_insertion_point(class_scope:tensorflow.TensorShapeProto) - private static final org.tensorflow.framework.TensorShapeProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.TensorShapeProto(); - } - - public static org.tensorflow.framework.TensorShapeProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public TensorShapeProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new TensorShapeProto(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.TensorShapeProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/TensorShapeProtoOrBuilder.java b/src/main/java/org/tensorflow/framework/TensorShapeProtoOrBuilder.java deleted file mode 100644 index 03d9bb6..0000000 --- a/src/main/java/org/tensorflow/framework/TensorShapeProtoOrBuilder.java +++ /dev/null @@ -1,108 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/tensor_shape.proto - -package org.tensorflow.framework; - -public interface TensorShapeProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.TensorShapeProto) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-   * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-   * for a 30 x 40 2D tensor.  If an entry has size -1, this
-   * corresponds to a dimension of unknown size. The names are
-   * optional.
-   * The order of entries in "dim" matters: It indicates the layout of the
-   * values in the tensor in-memory representation.
-   * The first entry in "dim" is the outermost dimension used to layout the
-   * values, the last entry is the innermost dimension.  This matches the
-   * in-memory layout of RowMajor Eigen tensors.
-   * If "dim.size()" > 0, "unknown_rank" must be false.
-   * 
- */ - java.util.List - getDimList(); - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-   * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-   * for a 30 x 40 2D tensor.  If an entry has size -1, this
-   * corresponds to a dimension of unknown size. The names are
-   * optional.
-   * The order of entries in "dim" matters: It indicates the layout of the
-   * values in the tensor in-memory representation.
-   * The first entry in "dim" is the outermost dimension used to layout the
-   * values, the last entry is the innermost dimension.  This matches the
-   * in-memory layout of RowMajor Eigen tensors.
-   * If "dim.size()" > 0, "unknown_rank" must be false.
-   * 
- */ - org.tensorflow.framework.TensorShapeProto.Dim getDim(int index); - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-   * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-   * for a 30 x 40 2D tensor.  If an entry has size -1, this
-   * corresponds to a dimension of unknown size. The names are
-   * optional.
-   * The order of entries in "dim" matters: It indicates the layout of the
-   * values in the tensor in-memory representation.
-   * The first entry in "dim" is the outermost dimension used to layout the
-   * values, the last entry is the innermost dimension.  This matches the
-   * in-memory layout of RowMajor Eigen tensors.
-   * If "dim.size()" > 0, "unknown_rank" must be false.
-   * 
- */ - int getDimCount(); - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-   * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-   * for a 30 x 40 2D tensor.  If an entry has size -1, this
-   * corresponds to a dimension of unknown size. The names are
-   * optional.
-   * The order of entries in "dim" matters: It indicates the layout of the
-   * values in the tensor in-memory representation.
-   * The first entry in "dim" is the outermost dimension used to layout the
-   * values, the last entry is the innermost dimension.  This matches the
-   * in-memory layout of RowMajor Eigen tensors.
-   * If "dim.size()" > 0, "unknown_rank" must be false.
-   * 
- */ - java.util.List - getDimOrBuilderList(); - /** - * repeated .tensorflow.TensorShapeProto.Dim dim = 2; - * - *
-   * Dimensions of the tensor, such as {"input", 30}, {"output", 40}
-   * for a 30 x 40 2D tensor.  If an entry has size -1, this
-   * corresponds to a dimension of unknown size. The names are
-   * optional.
-   * The order of entries in "dim" matters: It indicates the layout of the
-   * values in the tensor in-memory representation.
-   * The first entry in "dim" is the outermost dimension used to layout the
-   * values, the last entry is the innermost dimension.  This matches the
-   * in-memory layout of RowMajor Eigen tensors.
-   * If "dim.size()" > 0, "unknown_rank" must be false.
-   * 
- */ - org.tensorflow.framework.TensorShapeProto.DimOrBuilder getDimOrBuilder( - int index); - - /** - * optional bool unknown_rank = 3; - * - *
-   * If true, the number of dimensions in the shape is unknown.
-   * If true, "dim.size()" must be 0.
-   * 
- */ - boolean getUnknownRank(); -} diff --git a/src/main/java/org/tensorflow/framework/TensorShapeProtos.java b/src/main/java/org/tensorflow/framework/TensorShapeProtos.java deleted file mode 100644 index 04086a1..0000000 --- a/src/main/java/org/tensorflow/framework/TensorShapeProtos.java +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/tensor_shape.proto - -package org.tensorflow.framework; - -public final class TensorShapeProtos { - private TensorShapeProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_TensorShapeProto_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_TensorShapeProto_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_TensorShapeProto_Dim_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_TensorShapeProto_Dim_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n,tensorflow/core/framework/tensor_shape" + - ".proto\022\ntensorflow\"z\n\020TensorShapeProto\022-" + - "\n\003dim\030\002 \003(\0132 .tensorflow.TensorShapeProt" + - "o.Dim\022\024\n\014unknown_rank\030\003 \001(\010\032!\n\003Dim\022\014\n\004si" + - "ze\030\001 \001(\003\022\014\n\004name\030\002 \001(\tB/\n\030org.tensorflow" + - ".frameworkB\021TensorShapeProtosP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_tensorflow_TensorShapeProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_tensorflow_TensorShapeProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_TensorShapeProto_descriptor, - new java.lang.String[] { "Dim", "UnknownRank", }); - internal_static_tensorflow_TensorShapeProto_Dim_descriptor = - internal_static_tensorflow_TensorShapeProto_descriptor.getNestedTypes().get(0); - internal_static_tensorflow_TensorShapeProto_Dim_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_TensorShapeProto_Dim_descriptor, - new java.lang.String[] { "Size", "Name", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/org/tensorflow/framework/TensorSliceProto.java b/src/main/java/org/tensorflow/framework/TensorSliceProto.java deleted file mode 100644 index 95cad47..0000000 --- a/src/main/java/org/tensorflow/framework/TensorSliceProto.java +++ /dev/null @@ -1,1348 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/tensor_slice.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.TensorSliceProto} - * - *
- * Can only be interpreted if you know the corresponding TensorShape.
- * 
- */ -public final class TensorSliceProto extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.TensorSliceProto) - TensorSliceProtoOrBuilder { - // Use TensorSliceProto.newBuilder() to construct. - private TensorSliceProto(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TensorSliceProto() { - extent_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private TensorSliceProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - extent_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - extent_.add(input.readMessage(org.tensorflow.framework.TensorSliceProto.Extent.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - extent_ = java.util.Collections.unmodifiableList(extent_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.TensorSliceProtos.internal_static_tensorflow_TensorSliceProto_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.TensorSliceProtos.internal_static_tensorflow_TensorSliceProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.TensorSliceProto.class, org.tensorflow.framework.TensorSliceProto.Builder.class); - } - - public interface ExtentOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.TensorSliceProto.Extent) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int64 start = 1; - * - *
-     * Start index of the slice, starting at 0.
-     * 
- */ - long getStart(); - - /** - * optional int64 length = 2; - */ - long getLength(); - - public org.tensorflow.framework.TensorSliceProto.Extent.HasLengthCase getHasLengthCase(); - } - /** - * Protobuf type {@code tensorflow.TensorSliceProto.Extent} - * - *
-   * Extent of the slice in one dimension.
-   * 
- */ - public static final class Extent extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.TensorSliceProto.Extent) - ExtentOrBuilder { - // Use Extent.newBuilder() to construct. - private Extent(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Extent() { - start_ = 0L; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Extent( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 8: { - - start_ = input.readInt64(); - break; - } - case 16: { - hasLengthCase_ = 2; - hasLength_ = input.readInt64(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.TensorSliceProtos.internal_static_tensorflow_TensorSliceProto_Extent_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.TensorSliceProtos.internal_static_tensorflow_TensorSliceProto_Extent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.TensorSliceProto.Extent.class, org.tensorflow.framework.TensorSliceProto.Extent.Builder.class); - } - - private int hasLengthCase_ = 0; - private java.lang.Object hasLength_; - public enum HasLengthCase - implements com.google.protobuf.Internal.EnumLite { - LENGTH(2), - HASLENGTH_NOT_SET(0); - private int value = 0; - private HasLengthCase(int value) { - this.value = value; - } - public static HasLengthCase valueOf(int value) { - switch (value) { - case 2: return LENGTH; - case 0: return HASLENGTH_NOT_SET; - default: throw new java.lang.IllegalArgumentException( - "Value is undefined for this oneof enum."); - } - } - public int getNumber() { - return this.value; - } - }; - - public HasLengthCase - getHasLengthCase() { - return HasLengthCase.valueOf( - hasLengthCase_); - } - - public static final int START_FIELD_NUMBER = 1; - private long start_; - /** - * optional int64 start = 1; - * - *
-     * Start index of the slice, starting at 0.
-     * 
- */ - public long getStart() { - return start_; - } - - public static final int LENGTH_FIELD_NUMBER = 2; - /** - * optional int64 length = 2; - */ - public long getLength() { - if (hasLengthCase_ == 2) { - return (java.lang.Long) hasLength_; - } - return 0L; - } - - 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 (start_ != 0L) { - output.writeInt64(1, start_); - } - if (hasLengthCase_ == 2) { - output.writeInt64( - 2, (long)((java.lang.Long) hasLength_)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (start_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, start_); - } - if (hasLengthCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size( - 2, (long)((java.lang.Long) hasLength_)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.TensorSliceProto.Extent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.TensorSliceProto.Extent 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.TensorSliceProto.Extent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.TensorSliceProto.Extent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.TensorSliceProto.Extent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.TensorSliceProto.Extent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.TensorSliceProto.Extent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.TensorSliceProto.Extent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.TensorSliceProto.Extent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.TensorSliceProto.Extent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.TensorSliceProto.Extent 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.TensorSliceProto.Extent} - * - *
-     * Extent of the slice in one dimension.
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.TensorSliceProto.Extent) - org.tensorflow.framework.TensorSliceProto.ExtentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.TensorSliceProtos.internal_static_tensorflow_TensorSliceProto_Extent_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.TensorSliceProtos.internal_static_tensorflow_TensorSliceProto_Extent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.TensorSliceProto.Extent.class, org.tensorflow.framework.TensorSliceProto.Extent.Builder.class); - } - - // Construct using org.tensorflow.framework.TensorSliceProto.Extent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - start_ = 0L; - - hasLengthCase_ = 0; - hasLength_ = null; - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.TensorSliceProtos.internal_static_tensorflow_TensorSliceProto_Extent_descriptor; - } - - public org.tensorflow.framework.TensorSliceProto.Extent getDefaultInstanceForType() { - return org.tensorflow.framework.TensorSliceProto.Extent.getDefaultInstance(); - } - - public org.tensorflow.framework.TensorSliceProto.Extent build() { - org.tensorflow.framework.TensorSliceProto.Extent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.TensorSliceProto.Extent buildPartial() { - org.tensorflow.framework.TensorSliceProto.Extent result = new org.tensorflow.framework.TensorSliceProto.Extent(this); - result.start_ = start_; - if (hasLengthCase_ == 2) { - result.hasLength_ = hasLength_; - } - result.hasLengthCase_ = hasLengthCase_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.TensorSliceProto.Extent) { - return mergeFrom((org.tensorflow.framework.TensorSliceProto.Extent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.TensorSliceProto.Extent other) { - if (other == org.tensorflow.framework.TensorSliceProto.Extent.getDefaultInstance()) return this; - if (other.getStart() != 0L) { - setStart(other.getStart()); - } - switch (other.getHasLengthCase()) { - case LENGTH: { - setLength(other.getLength()); - break; - } - case HASLENGTH_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.TensorSliceProto.Extent parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.TensorSliceProto.Extent) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int hasLengthCase_ = 0; - private java.lang.Object hasLength_; - public HasLengthCase - getHasLengthCase() { - return HasLengthCase.valueOf( - hasLengthCase_); - } - - public Builder clearHasLength() { - hasLengthCase_ = 0; - hasLength_ = null; - onChanged(); - return this; - } - - - private long start_ ; - /** - * optional int64 start = 1; - * - *
-       * Start index of the slice, starting at 0.
-       * 
- */ - public long getStart() { - return start_; - } - /** - * optional int64 start = 1; - * - *
-       * Start index of the slice, starting at 0.
-       * 
- */ - public Builder setStart(long value) { - - start_ = value; - onChanged(); - return this; - } - /** - * optional int64 start = 1; - * - *
-       * Start index of the slice, starting at 0.
-       * 
- */ - public Builder clearStart() { - - start_ = 0L; - onChanged(); - return this; - } - - /** - * optional int64 length = 2; - */ - public long getLength() { - if (hasLengthCase_ == 2) { - return (java.lang.Long) hasLength_; - } - return 0L; - } - /** - * optional int64 length = 2; - */ - public Builder setLength(long value) { - hasLengthCase_ = 2; - hasLength_ = value; - onChanged(); - return this; - } - /** - * optional int64 length = 2; - */ - public Builder clearLength() { - if (hasLengthCase_ == 2) { - hasLengthCase_ = 0; - hasLength_ = null; - 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.TensorSliceProto.Extent) - } - - // @@protoc_insertion_point(class_scope:tensorflow.TensorSliceProto.Extent) - private static final org.tensorflow.framework.TensorSliceProto.Extent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.TensorSliceProto.Extent(); - } - - public static org.tensorflow.framework.TensorSliceProto.Extent getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Extent parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Extent(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.TensorSliceProto.Extent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int EXTENT_FIELD_NUMBER = 1; - private java.util.List extent_; - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-   * Extent of the slice in all tensor dimensions.
-   * Must have one entry for each of the dimension of the tensor that this
-   * slice belongs to.  The order of sizes is the same as the order of
-   * dimensions in the TensorShape.
-   * 
- */ - public java.util.List getExtentList() { - return extent_; - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-   * Extent of the slice in all tensor dimensions.
-   * Must have one entry for each of the dimension of the tensor that this
-   * slice belongs to.  The order of sizes is the same as the order of
-   * dimensions in the TensorShape.
-   * 
- */ - public java.util.List - getExtentOrBuilderList() { - return extent_; - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-   * Extent of the slice in all tensor dimensions.
-   * Must have one entry for each of the dimension of the tensor that this
-   * slice belongs to.  The order of sizes is the same as the order of
-   * dimensions in the TensorShape.
-   * 
- */ - public int getExtentCount() { - return extent_.size(); - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-   * Extent of the slice in all tensor dimensions.
-   * Must have one entry for each of the dimension of the tensor that this
-   * slice belongs to.  The order of sizes is the same as the order of
-   * dimensions in the TensorShape.
-   * 
- */ - public org.tensorflow.framework.TensorSliceProto.Extent getExtent(int index) { - return extent_.get(index); - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-   * Extent of the slice in all tensor dimensions.
-   * Must have one entry for each of the dimension of the tensor that this
-   * slice belongs to.  The order of sizes is the same as the order of
-   * dimensions in the TensorShape.
-   * 
- */ - public org.tensorflow.framework.TensorSliceProto.ExtentOrBuilder getExtentOrBuilder( - int index) { - return extent_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < extent_.size(); i++) { - output.writeMessage(1, extent_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < extent_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, extent_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.TensorSliceProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.TensorSliceProto 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.TensorSliceProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.TensorSliceProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.TensorSliceProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.TensorSliceProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.TensorSliceProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.TensorSliceProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.TensorSliceProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.TensorSliceProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.TensorSliceProto 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.TensorSliceProto} - * - *
-   * Can only be interpreted if you know the corresponding TensorShape.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.TensorSliceProto) - org.tensorflow.framework.TensorSliceProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.TensorSliceProtos.internal_static_tensorflow_TensorSliceProto_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.TensorSliceProtos.internal_static_tensorflow_TensorSliceProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.TensorSliceProto.class, org.tensorflow.framework.TensorSliceProto.Builder.class); - } - - // Construct using org.tensorflow.framework.TensorSliceProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getExtentFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (extentBuilder_ == null) { - extent_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - extentBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.TensorSliceProtos.internal_static_tensorflow_TensorSliceProto_descriptor; - } - - public org.tensorflow.framework.TensorSliceProto getDefaultInstanceForType() { - return org.tensorflow.framework.TensorSliceProto.getDefaultInstance(); - } - - public org.tensorflow.framework.TensorSliceProto build() { - org.tensorflow.framework.TensorSliceProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.TensorSliceProto buildPartial() { - org.tensorflow.framework.TensorSliceProto result = new org.tensorflow.framework.TensorSliceProto(this); - int from_bitField0_ = bitField0_; - if (extentBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - extent_ = java.util.Collections.unmodifiableList(extent_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.extent_ = extent_; - } else { - result.extent_ = extentBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.TensorSliceProto) { - return mergeFrom((org.tensorflow.framework.TensorSliceProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.TensorSliceProto other) { - if (other == org.tensorflow.framework.TensorSliceProto.getDefaultInstance()) return this; - if (extentBuilder_ == null) { - if (!other.extent_.isEmpty()) { - if (extent_.isEmpty()) { - extent_ = other.extent_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureExtentIsMutable(); - extent_.addAll(other.extent_); - } - onChanged(); - } - } else { - if (!other.extent_.isEmpty()) { - if (extentBuilder_.isEmpty()) { - extentBuilder_.dispose(); - extentBuilder_ = null; - extent_ = other.extent_; - bitField0_ = (bitField0_ & ~0x00000001); - extentBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getExtentFieldBuilder() : null; - } else { - extentBuilder_.addAllMessages(other.extent_); - } - } - } - 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.TensorSliceProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.TensorSliceProto) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List extent_ = - java.util.Collections.emptyList(); - private void ensureExtentIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - extent_ = new java.util.ArrayList(extent_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.TensorSliceProto.Extent, org.tensorflow.framework.TensorSliceProto.Extent.Builder, org.tensorflow.framework.TensorSliceProto.ExtentOrBuilder> extentBuilder_; - - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public java.util.List getExtentList() { - if (extentBuilder_ == null) { - return java.util.Collections.unmodifiableList(extent_); - } else { - return extentBuilder_.getMessageList(); - } - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public int getExtentCount() { - if (extentBuilder_ == null) { - return extent_.size(); - } else { - return extentBuilder_.getCount(); - } - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public org.tensorflow.framework.TensorSliceProto.Extent getExtent(int index) { - if (extentBuilder_ == null) { - return extent_.get(index); - } else { - return extentBuilder_.getMessage(index); - } - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public Builder setExtent( - int index, org.tensorflow.framework.TensorSliceProto.Extent value) { - if (extentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExtentIsMutable(); - extent_.set(index, value); - onChanged(); - } else { - extentBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public Builder setExtent( - int index, org.tensorflow.framework.TensorSliceProto.Extent.Builder builderForValue) { - if (extentBuilder_ == null) { - ensureExtentIsMutable(); - extent_.set(index, builderForValue.build()); - onChanged(); - } else { - extentBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public Builder addExtent(org.tensorflow.framework.TensorSliceProto.Extent value) { - if (extentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExtentIsMutable(); - extent_.add(value); - onChanged(); - } else { - extentBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public Builder addExtent( - int index, org.tensorflow.framework.TensorSliceProto.Extent value) { - if (extentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExtentIsMutable(); - extent_.add(index, value); - onChanged(); - } else { - extentBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public Builder addExtent( - org.tensorflow.framework.TensorSliceProto.Extent.Builder builderForValue) { - if (extentBuilder_ == null) { - ensureExtentIsMutable(); - extent_.add(builderForValue.build()); - onChanged(); - } else { - extentBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public Builder addExtent( - int index, org.tensorflow.framework.TensorSliceProto.Extent.Builder builderForValue) { - if (extentBuilder_ == null) { - ensureExtentIsMutable(); - extent_.add(index, builderForValue.build()); - onChanged(); - } else { - extentBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public Builder addAllExtent( - java.lang.Iterable values) { - if (extentBuilder_ == null) { - ensureExtentIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, extent_); - onChanged(); - } else { - extentBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public Builder clearExtent() { - if (extentBuilder_ == null) { - extent_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - extentBuilder_.clear(); - } - return this; - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public Builder removeExtent(int index) { - if (extentBuilder_ == null) { - ensureExtentIsMutable(); - extent_.remove(index); - onChanged(); - } else { - extentBuilder_.remove(index); - } - return this; - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public org.tensorflow.framework.TensorSliceProto.Extent.Builder getExtentBuilder( - int index) { - return getExtentFieldBuilder().getBuilder(index); - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public org.tensorflow.framework.TensorSliceProto.ExtentOrBuilder getExtentOrBuilder( - int index) { - if (extentBuilder_ == null) { - return extent_.get(index); } else { - return extentBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public java.util.List - getExtentOrBuilderList() { - if (extentBuilder_ != null) { - return extentBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(extent_); - } - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public org.tensorflow.framework.TensorSliceProto.Extent.Builder addExtentBuilder() { - return getExtentFieldBuilder().addBuilder( - org.tensorflow.framework.TensorSliceProto.Extent.getDefaultInstance()); - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public org.tensorflow.framework.TensorSliceProto.Extent.Builder addExtentBuilder( - int index) { - return getExtentFieldBuilder().addBuilder( - index, org.tensorflow.framework.TensorSliceProto.Extent.getDefaultInstance()); - } - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-     * Extent of the slice in all tensor dimensions.
-     * Must have one entry for each of the dimension of the tensor that this
-     * slice belongs to.  The order of sizes is the same as the order of
-     * dimensions in the TensorShape.
-     * 
- */ - public java.util.List - getExtentBuilderList() { - return getExtentFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.TensorSliceProto.Extent, org.tensorflow.framework.TensorSliceProto.Extent.Builder, org.tensorflow.framework.TensorSliceProto.ExtentOrBuilder> - getExtentFieldBuilder() { - if (extentBuilder_ == null) { - extentBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.tensorflow.framework.TensorSliceProto.Extent, org.tensorflow.framework.TensorSliceProto.Extent.Builder, org.tensorflow.framework.TensorSliceProto.ExtentOrBuilder>( - extent_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - extent_ = null; - } - return extentBuilder_; - } - 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.TensorSliceProto) - } - - // @@protoc_insertion_point(class_scope:tensorflow.TensorSliceProto) - private static final org.tensorflow.framework.TensorSliceProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.TensorSliceProto(); - } - - public static org.tensorflow.framework.TensorSliceProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public TensorSliceProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new TensorSliceProto(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.TensorSliceProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/TensorSliceProtoOrBuilder.java b/src/main/java/org/tensorflow/framework/TensorSliceProtoOrBuilder.java deleted file mode 100644 index 9a13fda..0000000 --- a/src/main/java/org/tensorflow/framework/TensorSliceProtoOrBuilder.java +++ /dev/null @@ -1,68 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/tensor_slice.proto - -package org.tensorflow.framework; - -public interface TensorSliceProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.TensorSliceProto) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-   * Extent of the slice in all tensor dimensions.
-   * Must have one entry for each of the dimension of the tensor that this
-   * slice belongs to.  The order of sizes is the same as the order of
-   * dimensions in the TensorShape.
-   * 
- */ - java.util.List - getExtentList(); - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-   * Extent of the slice in all tensor dimensions.
-   * Must have one entry for each of the dimension of the tensor that this
-   * slice belongs to.  The order of sizes is the same as the order of
-   * dimensions in the TensorShape.
-   * 
- */ - org.tensorflow.framework.TensorSliceProto.Extent getExtent(int index); - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-   * Extent of the slice in all tensor dimensions.
-   * Must have one entry for each of the dimension of the tensor that this
-   * slice belongs to.  The order of sizes is the same as the order of
-   * dimensions in the TensorShape.
-   * 
- */ - int getExtentCount(); - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-   * Extent of the slice in all tensor dimensions.
-   * Must have one entry for each of the dimension of the tensor that this
-   * slice belongs to.  The order of sizes is the same as the order of
-   * dimensions in the TensorShape.
-   * 
- */ - java.util.List - getExtentOrBuilderList(); - /** - * repeated .tensorflow.TensorSliceProto.Extent extent = 1; - * - *
-   * Extent of the slice in all tensor dimensions.
-   * Must have one entry for each of the dimension of the tensor that this
-   * slice belongs to.  The order of sizes is the same as the order of
-   * dimensions in the TensorShape.
-   * 
- */ - org.tensorflow.framework.TensorSliceProto.ExtentOrBuilder getExtentOrBuilder( - int index); -} diff --git a/src/main/java/org/tensorflow/framework/TensorSliceProtos.java b/src/main/java/org/tensorflow/framework/TensorSliceProtos.java deleted file mode 100644 index 7e12769..0000000 --- a/src/main/java/org/tensorflow/framework/TensorSliceProtos.java +++ /dev/null @@ -1,65 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/tensor_slice.proto - -package org.tensorflow.framework; - -public final class TensorSliceProtos { - private TensorSliceProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_TensorSliceProto_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_TensorSliceProto_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_TensorSliceProto_Extent_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_TensorSliceProto_Extent_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n,tensorflow/core/framework/tensor_slice" + - ".proto\022\ntensorflow\"\200\001\n\020TensorSliceProto\022" + - "3\n\006extent\030\001 \003(\0132#.tensorflow.TensorSlice" + - "Proto.Extent\0327\n\006Extent\022\r\n\005start\030\001 \001(\003\022\020\n" + - "\006length\030\002 \001(\003H\000B\014\n\nhas_lengthB/\n\030org.ten" + - "sorflow.frameworkB\021TensorSliceProtosP\001b\006" + - "proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_tensorflow_TensorSliceProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_tensorflow_TensorSliceProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_TensorSliceProto_descriptor, - new java.lang.String[] { "Extent", }); - internal_static_tensorflow_TensorSliceProto_Extent_descriptor = - internal_static_tensorflow_TensorSliceProto_descriptor.getNestedTypes().get(0); - internal_static_tensorflow_TensorSliceProto_Extent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_TensorSliceProto_Extent_descriptor, - new java.lang.String[] { "Start", "Length", "HasLength", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/org/tensorflow/framework/TypesProtos.java b/src/main/java/org/tensorflow/framework/TypesProtos.java deleted file mode 100644 index de05743..0000000 --- a/src/main/java/org/tensorflow/framework/TypesProtos.java +++ /dev/null @@ -1,54 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/types.proto - -package org.tensorflow.framework; - -public final class TypesProtos { - private TypesProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n%tensorflow/core/framework/types.proto\022" + - "\ntensorflow*\324\004\n\010DataType\022\016\n\nDT_INVALID\020\000" + - "\022\014\n\010DT_FLOAT\020\001\022\r\n\tDT_DOUBLE\020\002\022\014\n\010DT_INT3" + - "2\020\003\022\014\n\010DT_UINT8\020\004\022\014\n\010DT_INT16\020\005\022\013\n\007DT_IN" + - "T8\020\006\022\r\n\tDT_STRING\020\007\022\020\n\014DT_COMPLEX64\020\010\022\014\n" + - "\010DT_INT64\020\t\022\013\n\007DT_BOOL\020\n\022\014\n\010DT_QINT8\020\013\022\r" + - "\n\tDT_QUINT8\020\014\022\r\n\tDT_QINT32\020\r\022\017\n\013DT_BFLOA" + - "T16\020\016\022\r\n\tDT_QINT16\020\017\022\016\n\nDT_QUINT16\020\020\022\r\n\t" + - "DT_UINT16\020\021\022\020\n\014DT_FLOAT_REF\020e\022\021\n\rDT_DOUB" + - "LE_REF\020f\022\020\n\014DT_INT32_REF\020g\022\020\n\014DT_UINT8_R", - "EF\020h\022\020\n\014DT_INT16_REF\020i\022\017\n\013DT_INT8_REF\020j\022" + - "\021\n\rDT_STRING_REF\020k\022\024\n\020DT_COMPLEX64_REF\020l" + - "\022\020\n\014DT_INT64_REF\020m\022\017\n\013DT_BOOL_REF\020n\022\020\n\014D" + - "T_QINT8_REF\020o\022\021\n\rDT_QUINT8_REF\020p\022\021\n\rDT_Q" + - "INT32_REF\020q\022\023\n\017DT_BFLOAT16_REF\020r\022\021\n\rDT_Q" + - "INT16_REF\020s\022\022\n\016DT_QUINT16_REF\020t\022\021\n\rDT_UI" + - "NT16_REF\020uB)\n\030org.tensorflow.frameworkB\013" + - "TypesProtosP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/org/tensorflow/framework/VariableDef.java b/src/main/java/org/tensorflow/framework/VariableDef.java deleted file mode 100644 index 5ba4a1b..0000000 --- a/src/main/java/org/tensorflow/framework/VariableDef.java +++ /dev/null @@ -1,998 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/variable.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.VariableDef} - * - *
- * Protocol buffer representing a Variable.
- * 
- */ -public final class VariableDef extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.VariableDef) - VariableDefOrBuilder { - // Use VariableDef.newBuilder() to construct. - private VariableDef(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private VariableDef() { - variableName_ = ""; - initializerName_ = ""; - snapshotName_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private VariableDef( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - 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: { - String s = input.readStringRequireUtf8(); - - variableName_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - initializerName_ = s; - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - snapshotName_ = s; - break; - } - case 34: { - org.tensorflow.framework.SaveSliceInfoDef.Builder subBuilder = null; - if (saveSliceInfoDef_ != null) { - subBuilder = saveSliceInfoDef_.toBuilder(); - } - saveSliceInfoDef_ = input.readMessage(org.tensorflow.framework.SaveSliceInfoDef.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(saveSliceInfoDef_); - saveSliceInfoDef_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_VariableDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_VariableDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.VariableDef.class, org.tensorflow.framework.VariableDef.Builder.class); - } - - public static final int VARIABLE_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object variableName_; - /** - * optional string variable_name = 1; - * - *
-   * Name of the variable tensor.
-   * 
- */ - public java.lang.String getVariableName() { - java.lang.Object ref = variableName_; - 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(); - variableName_ = s; - return s; - } - } - /** - * optional string variable_name = 1; - * - *
-   * Name of the variable tensor.
-   * 
- */ - public com.google.protobuf.ByteString - getVariableNameBytes() { - java.lang.Object ref = variableName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - variableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INITIALIZER_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object initializerName_; - /** - * optional string initializer_name = 2; - * - *
-   * Name of the initializer op.
-   * 
- */ - public java.lang.String getInitializerName() { - java.lang.Object ref = initializerName_; - 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(); - initializerName_ = s; - return s; - } - } - /** - * optional string initializer_name = 2; - * - *
-   * Name of the initializer op.
-   * 
- */ - public com.google.protobuf.ByteString - getInitializerNameBytes() { - java.lang.Object ref = initializerName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - initializerName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SNAPSHOT_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object snapshotName_; - /** - * optional string snapshot_name = 3; - * - *
-   * Name of the snapshot tensor.
-   * 
- */ - public java.lang.String getSnapshotName() { - java.lang.Object ref = snapshotName_; - 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(); - snapshotName_ = s; - return s; - } - } - /** - * optional string snapshot_name = 3; - * - *
-   * Name of the snapshot tensor.
-   * 
- */ - public com.google.protobuf.ByteString - getSnapshotNameBytes() { - java.lang.Object ref = snapshotName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - snapshotName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SAVE_SLICE_INFO_DEF_FIELD_NUMBER = 4; - private org.tensorflow.framework.SaveSliceInfoDef saveSliceInfoDef_; - /** - * optional .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; - * - *
-   * Support for saving variables as slices of a larger variable.
-   * 
- */ - public boolean hasSaveSliceInfoDef() { - return saveSliceInfoDef_ != null; - } - /** - * optional .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; - * - *
-   * Support for saving variables as slices of a larger variable.
-   * 
- */ - public org.tensorflow.framework.SaveSliceInfoDef getSaveSliceInfoDef() { - return saveSliceInfoDef_ == null ? org.tensorflow.framework.SaveSliceInfoDef.getDefaultInstance() : saveSliceInfoDef_; - } - /** - * optional .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; - * - *
-   * Support for saving variables as slices of a larger variable.
-   * 
- */ - public org.tensorflow.framework.SaveSliceInfoDefOrBuilder getSaveSliceInfoDefOrBuilder() { - return getSaveSliceInfoDef(); - } - - 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 (!getVariableNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, variableName_); - } - if (!getInitializerNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, initializerName_); - } - if (!getSnapshotNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, snapshotName_); - } - if (saveSliceInfoDef_ != null) { - output.writeMessage(4, getSaveSliceInfoDef()); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getVariableNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, variableName_); - } - if (!getInitializerNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, initializerName_); - } - if (!getSnapshotNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, snapshotName_); - } - if (saveSliceInfoDef_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getSaveSliceInfoDef()); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.VariableDef parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.VariableDef 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.VariableDef parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.VariableDef parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.VariableDef parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.VariableDef parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.VariableDef parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.VariableDef parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.VariableDef parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.VariableDef parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.VariableDef 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.VariableDef} - * - *
-   * Protocol buffer representing a Variable.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.VariableDef) - org.tensorflow.framework.VariableDefOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_VariableDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_VariableDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.VariableDef.class, org.tensorflow.framework.VariableDef.Builder.class); - } - - // Construct using org.tensorflow.framework.VariableDef.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - variableName_ = ""; - - initializerName_ = ""; - - snapshotName_ = ""; - - if (saveSliceInfoDefBuilder_ == null) { - saveSliceInfoDef_ = null; - } else { - saveSliceInfoDef_ = null; - saveSliceInfoDefBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_VariableDef_descriptor; - } - - public org.tensorflow.framework.VariableDef getDefaultInstanceForType() { - return org.tensorflow.framework.VariableDef.getDefaultInstance(); - } - - public org.tensorflow.framework.VariableDef build() { - org.tensorflow.framework.VariableDef result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.VariableDef buildPartial() { - org.tensorflow.framework.VariableDef result = new org.tensorflow.framework.VariableDef(this); - result.variableName_ = variableName_; - result.initializerName_ = initializerName_; - result.snapshotName_ = snapshotName_; - if (saveSliceInfoDefBuilder_ == null) { - result.saveSliceInfoDef_ = saveSliceInfoDef_; - } else { - result.saveSliceInfoDef_ = saveSliceInfoDefBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.VariableDef) { - return mergeFrom((org.tensorflow.framework.VariableDef)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.VariableDef other) { - if (other == org.tensorflow.framework.VariableDef.getDefaultInstance()) return this; - if (!other.getVariableName().isEmpty()) { - variableName_ = other.variableName_; - onChanged(); - } - if (!other.getInitializerName().isEmpty()) { - initializerName_ = other.initializerName_; - onChanged(); - } - if (!other.getSnapshotName().isEmpty()) { - snapshotName_ = other.snapshotName_; - onChanged(); - } - if (other.hasSaveSliceInfoDef()) { - mergeSaveSliceInfoDef(other.getSaveSliceInfoDef()); - } - 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.VariableDef parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.VariableDef) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object variableName_ = ""; - /** - * optional string variable_name = 1; - * - *
-     * Name of the variable tensor.
-     * 
- */ - public java.lang.String getVariableName() { - java.lang.Object ref = variableName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - variableName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string variable_name = 1; - * - *
-     * Name of the variable tensor.
-     * 
- */ - public com.google.protobuf.ByteString - getVariableNameBytes() { - java.lang.Object ref = variableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - variableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string variable_name = 1; - * - *
-     * Name of the variable tensor.
-     * 
- */ - public Builder setVariableName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - variableName_ = value; - onChanged(); - return this; - } - /** - * optional string variable_name = 1; - * - *
-     * Name of the variable tensor.
-     * 
- */ - public Builder clearVariableName() { - - variableName_ = getDefaultInstance().getVariableName(); - onChanged(); - return this; - } - /** - * optional string variable_name = 1; - * - *
-     * Name of the variable tensor.
-     * 
- */ - public Builder setVariableNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - variableName_ = value; - onChanged(); - return this; - } - - private java.lang.Object initializerName_ = ""; - /** - * optional string initializer_name = 2; - * - *
-     * Name of the initializer op.
-     * 
- */ - public java.lang.String getInitializerName() { - java.lang.Object ref = initializerName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - initializerName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string initializer_name = 2; - * - *
-     * Name of the initializer op.
-     * 
- */ - public com.google.protobuf.ByteString - getInitializerNameBytes() { - java.lang.Object ref = initializerName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - initializerName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string initializer_name = 2; - * - *
-     * Name of the initializer op.
-     * 
- */ - public Builder setInitializerName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - initializerName_ = value; - onChanged(); - return this; - } - /** - * optional string initializer_name = 2; - * - *
-     * Name of the initializer op.
-     * 
- */ - public Builder clearInitializerName() { - - initializerName_ = getDefaultInstance().getInitializerName(); - onChanged(); - return this; - } - /** - * optional string initializer_name = 2; - * - *
-     * Name of the initializer op.
-     * 
- */ - public Builder setInitializerNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - initializerName_ = value; - onChanged(); - return this; - } - - private java.lang.Object snapshotName_ = ""; - /** - * optional string snapshot_name = 3; - * - *
-     * Name of the snapshot tensor.
-     * 
- */ - public java.lang.String getSnapshotName() { - java.lang.Object ref = snapshotName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - snapshotName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string snapshot_name = 3; - * - *
-     * Name of the snapshot tensor.
-     * 
- */ - public com.google.protobuf.ByteString - getSnapshotNameBytes() { - java.lang.Object ref = snapshotName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - snapshotName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string snapshot_name = 3; - * - *
-     * Name of the snapshot tensor.
-     * 
- */ - public Builder setSnapshotName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - snapshotName_ = value; - onChanged(); - return this; - } - /** - * optional string snapshot_name = 3; - * - *
-     * Name of the snapshot tensor.
-     * 
- */ - public Builder clearSnapshotName() { - - snapshotName_ = getDefaultInstance().getSnapshotName(); - onChanged(); - return this; - } - /** - * optional string snapshot_name = 3; - * - *
-     * Name of the snapshot tensor.
-     * 
- */ - public Builder setSnapshotNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - snapshotName_ = value; - onChanged(); - return this; - } - - private org.tensorflow.framework.SaveSliceInfoDef saveSliceInfoDef_ = null; - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.SaveSliceInfoDef, org.tensorflow.framework.SaveSliceInfoDef.Builder, org.tensorflow.framework.SaveSliceInfoDefOrBuilder> saveSliceInfoDefBuilder_; - /** - * optional .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; - * - *
-     * Support for saving variables as slices of a larger variable.
-     * 
- */ - public boolean hasSaveSliceInfoDef() { - return saveSliceInfoDefBuilder_ != null || saveSliceInfoDef_ != null; - } - /** - * optional .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; - * - *
-     * Support for saving variables as slices of a larger variable.
-     * 
- */ - public org.tensorflow.framework.SaveSliceInfoDef getSaveSliceInfoDef() { - if (saveSliceInfoDefBuilder_ == null) { - return saveSliceInfoDef_ == null ? org.tensorflow.framework.SaveSliceInfoDef.getDefaultInstance() : saveSliceInfoDef_; - } else { - return saveSliceInfoDefBuilder_.getMessage(); - } - } - /** - * optional .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; - * - *
-     * Support for saving variables as slices of a larger variable.
-     * 
- */ - public Builder setSaveSliceInfoDef(org.tensorflow.framework.SaveSliceInfoDef value) { - if (saveSliceInfoDefBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - saveSliceInfoDef_ = value; - onChanged(); - } else { - saveSliceInfoDefBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; - * - *
-     * Support for saving variables as slices of a larger variable.
-     * 
- */ - public Builder setSaveSliceInfoDef( - org.tensorflow.framework.SaveSliceInfoDef.Builder builderForValue) { - if (saveSliceInfoDefBuilder_ == null) { - saveSliceInfoDef_ = builderForValue.build(); - onChanged(); - } else { - saveSliceInfoDefBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; - * - *
-     * Support for saving variables as slices of a larger variable.
-     * 
- */ - public Builder mergeSaveSliceInfoDef(org.tensorflow.framework.SaveSliceInfoDef value) { - if (saveSliceInfoDefBuilder_ == null) { - if (saveSliceInfoDef_ != null) { - saveSliceInfoDef_ = - org.tensorflow.framework.SaveSliceInfoDef.newBuilder(saveSliceInfoDef_).mergeFrom(value).buildPartial(); - } else { - saveSliceInfoDef_ = value; - } - onChanged(); - } else { - saveSliceInfoDefBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; - * - *
-     * Support for saving variables as slices of a larger variable.
-     * 
- */ - public Builder clearSaveSliceInfoDef() { - if (saveSliceInfoDefBuilder_ == null) { - saveSliceInfoDef_ = null; - onChanged(); - } else { - saveSliceInfoDef_ = null; - saveSliceInfoDefBuilder_ = null; - } - - return this; - } - /** - * optional .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; - * - *
-     * Support for saving variables as slices of a larger variable.
-     * 
- */ - public org.tensorflow.framework.SaveSliceInfoDef.Builder getSaveSliceInfoDefBuilder() { - - onChanged(); - return getSaveSliceInfoDefFieldBuilder().getBuilder(); - } - /** - * optional .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; - * - *
-     * Support for saving variables as slices of a larger variable.
-     * 
- */ - public org.tensorflow.framework.SaveSliceInfoDefOrBuilder getSaveSliceInfoDefOrBuilder() { - if (saveSliceInfoDefBuilder_ != null) { - return saveSliceInfoDefBuilder_.getMessageOrBuilder(); - } else { - return saveSliceInfoDef_ == null ? - org.tensorflow.framework.SaveSliceInfoDef.getDefaultInstance() : saveSliceInfoDef_; - } - } - /** - * optional .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; - * - *
-     * Support for saving variables as slices of a larger variable.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.SaveSliceInfoDef, org.tensorflow.framework.SaveSliceInfoDef.Builder, org.tensorflow.framework.SaveSliceInfoDefOrBuilder> - getSaveSliceInfoDefFieldBuilder() { - if (saveSliceInfoDefBuilder_ == null) { - saveSliceInfoDefBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.tensorflow.framework.SaveSliceInfoDef, org.tensorflow.framework.SaveSliceInfoDef.Builder, org.tensorflow.framework.SaveSliceInfoDefOrBuilder>( - getSaveSliceInfoDef(), - getParentForChildren(), - isClean()); - saveSliceInfoDef_ = null; - } - return saveSliceInfoDefBuilder_; - } - 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.VariableDef) - } - - // @@protoc_insertion_point(class_scope:tensorflow.VariableDef) - private static final org.tensorflow.framework.VariableDef DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.VariableDef(); - } - - public static org.tensorflow.framework.VariableDef getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public VariableDef parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new VariableDef(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.VariableDef getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/VariableDefOrBuilder.java b/src/main/java/org/tensorflow/framework/VariableDefOrBuilder.java deleted file mode 100644 index 964822e..0000000 --- a/src/main/java/org/tensorflow/framework/VariableDefOrBuilder.java +++ /dev/null @@ -1,88 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/variable.proto - -package org.tensorflow.framework; - -public interface VariableDefOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.VariableDef) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string variable_name = 1; - * - *
-   * Name of the variable tensor.
-   * 
- */ - java.lang.String getVariableName(); - /** - * optional string variable_name = 1; - * - *
-   * Name of the variable tensor.
-   * 
- */ - com.google.protobuf.ByteString - getVariableNameBytes(); - - /** - * optional string initializer_name = 2; - * - *
-   * Name of the initializer op.
-   * 
- */ - java.lang.String getInitializerName(); - /** - * optional string initializer_name = 2; - * - *
-   * Name of the initializer op.
-   * 
- */ - com.google.protobuf.ByteString - getInitializerNameBytes(); - - /** - * optional string snapshot_name = 3; - * - *
-   * Name of the snapshot tensor.
-   * 
- */ - java.lang.String getSnapshotName(); - /** - * optional string snapshot_name = 3; - * - *
-   * Name of the snapshot tensor.
-   * 
- */ - com.google.protobuf.ByteString - getSnapshotNameBytes(); - - /** - * optional .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; - * - *
-   * Support for saving variables as slices of a larger variable.
-   * 
- */ - boolean hasSaveSliceInfoDef(); - /** - * optional .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; - * - *
-   * Support for saving variables as slices of a larger variable.
-   * 
- */ - org.tensorflow.framework.SaveSliceInfoDef getSaveSliceInfoDef(); - /** - * optional .tensorflow.SaveSliceInfoDef save_slice_info_def = 4; - * - *
-   * Support for saving variables as slices of a larger variable.
-   * 
- */ - org.tensorflow.framework.SaveSliceInfoDefOrBuilder getSaveSliceInfoDefOrBuilder(); -} diff --git a/src/main/java/org/tensorflow/framework/VariableProtos.java b/src/main/java/org/tensorflow/framework/VariableProtos.java deleted file mode 100644 index f211640..0000000 --- a/src/main/java/org/tensorflow/framework/VariableProtos.java +++ /dev/null @@ -1,67 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/variable.proto - -package org.tensorflow.framework; - -public final class VariableProtos { - private VariableProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_VariableDef_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_VariableDef_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_SaveSliceInfoDef_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_SaveSliceInfoDef_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n(tensorflow/core/framework/variable.pro" + - "to\022\ntensorflow\"\220\001\n\013VariableDef\022\025\n\rvariab" + - "le_name\030\001 \001(\t\022\030\n\020initializer_name\030\002 \001(\t\022" + - "\025\n\rsnapshot_name\030\003 \001(\t\0229\n\023save_slice_inf" + - "o_def\030\004 \001(\0132\034.tensorflow.SaveSliceInfoDe" + - "f\"`\n\020SaveSliceInfoDef\022\021\n\tfull_name\030\001 \001(\t" + - "\022\022\n\nfull_shape\030\002 \003(\005\022\022\n\nvar_offset\030\003 \003(\005" + - "\022\021\n\tvar_shape\030\004 \003(\005B,\n\030org.tensorflow.fr" + - "ameworkB\016VariableProtosP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_tensorflow_VariableDef_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_tensorflow_VariableDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_VariableDef_descriptor, - new java.lang.String[] { "VariableName", "InitializerName", "SnapshotName", "SaveSliceInfoDef", }); - internal_static_tensorflow_SaveSliceInfoDef_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_tensorflow_SaveSliceInfoDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_SaveSliceInfoDef_descriptor, - new java.lang.String[] { "FullName", "FullShape", "VarOffset", "VarShape", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/main/java/org/tensorflow/framework/VersionDef.java b/src/main/java/org/tensorflow/framework/VersionDef.java deleted file mode 100644 index 15bf784..0000000 --- a/src/main/java/org/tensorflow/framework/VersionDef.java +++ /dev/null @@ -1,679 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/versions.proto - -package org.tensorflow.framework; - -/** - * Protobuf type {@code tensorflow.VersionDef} - * - *
- * Version information for a piece of serialized data
- * There are different types of versions for each type of data
- * (GraphDef, etc.), but they all have the same common shape
- * described here.
- * Each consumer has "consumer" and "min_producer" versions (specified
- * elsewhere).  A consumer is allowed to consume this data if
- *   producer >= min_producer
- *   consumer >= min_consumer
- *   consumer not in bad_consumers
- * 
- */ -public final class VersionDef extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:tensorflow.VersionDef) - VersionDefOrBuilder { - // Use VersionDef.newBuilder() to construct. - private VersionDef(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private VersionDef() { - producer_ = 0; - minConsumer_ = 0; - badConsumers_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private VersionDef( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 8: { - - producer_ = input.readInt32(); - break; - } - case 16: { - - minConsumer_ = input.readInt32(); - break; - } - case 24: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - badConsumers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - badConsumers_.add(input.readInt32()); - break; - } - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) { - badConsumers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - while (input.getBytesUntilLimit() > 0) { - badConsumers_.add(input.readInt32()); - } - input.popLimit(limit); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - badConsumers_ = java.util.Collections.unmodifiableList(badConsumers_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.VersionsProtos.internal_static_tensorflow_VersionDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.VersionsProtos.internal_static_tensorflow_VersionDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.VersionDef.class, org.tensorflow.framework.VersionDef.Builder.class); - } - - private int bitField0_; - public static final int PRODUCER_FIELD_NUMBER = 1; - private int producer_; - /** - * optional int32 producer = 1; - * - *
-   * The version of the code that produced this data.
-   * 
- */ - public int getProducer() { - return producer_; - } - - public static final int MIN_CONSUMER_FIELD_NUMBER = 2; - private int minConsumer_; - /** - * optional int32 min_consumer = 2; - * - *
-   * Any consumer below this version is not allowed to consume this data.
-   * 
- */ - public int getMinConsumer() { - return minConsumer_; - } - - public static final int BAD_CONSUMERS_FIELD_NUMBER = 3; - private java.util.List badConsumers_; - /** - * repeated int32 bad_consumers = 3; - * - *
-   * Specific consumer versions which are disallowed (e.g. due to bugs).
-   * 
- */ - public java.util.List - getBadConsumersList() { - return badConsumers_; - } - /** - * repeated int32 bad_consumers = 3; - * - *
-   * Specific consumer versions which are disallowed (e.g. due to bugs).
-   * 
- */ - public int getBadConsumersCount() { - return badConsumers_.size(); - } - /** - * repeated int32 bad_consumers = 3; - * - *
-   * Specific consumer versions which are disallowed (e.g. due to bugs).
-   * 
- */ - public int getBadConsumers(int index) { - return badConsumers_.get(index); - } - private int badConsumersMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (producer_ != 0) { - output.writeInt32(1, producer_); - } - if (minConsumer_ != 0) { - output.writeInt32(2, minConsumer_); - } - if (getBadConsumersList().size() > 0) { - output.writeRawVarint32(26); - output.writeRawVarint32(badConsumersMemoizedSerializedSize); - } - for (int i = 0; i < badConsumers_.size(); i++) { - output.writeInt32NoTag(badConsumers_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (producer_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, producer_); - } - if (minConsumer_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, minConsumer_); - } - { - int dataSize = 0; - for (int i = 0; i < badConsumers_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(badConsumers_.get(i)); - } - size += dataSize; - if (!getBadConsumersList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - badConsumersMemoizedSerializedSize = dataSize; - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static org.tensorflow.framework.VersionDef parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.VersionDef 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.VersionDef parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.tensorflow.framework.VersionDef parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.tensorflow.framework.VersionDef parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.VersionDef parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.VersionDef parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.tensorflow.framework.VersionDef parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.tensorflow.framework.VersionDef parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.tensorflow.framework.VersionDef parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.tensorflow.framework.VersionDef 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code tensorflow.VersionDef} - * - *
-   * Version information for a piece of serialized data
-   * There are different types of versions for each type of data
-   * (GraphDef, etc.), but they all have the same common shape
-   * described here.
-   * Each consumer has "consumer" and "min_producer" versions (specified
-   * elsewhere).  A consumer is allowed to consume this data if
-   *   producer >= min_producer
-   *   consumer >= min_consumer
-   *   consumer not in bad_consumers
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:tensorflow.VersionDef) - org.tensorflow.framework.VersionDefOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.tensorflow.framework.VersionsProtos.internal_static_tensorflow_VersionDef_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.tensorflow.framework.VersionsProtos.internal_static_tensorflow_VersionDef_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.tensorflow.framework.VersionDef.class, org.tensorflow.framework.VersionDef.Builder.class); - } - - // Construct using org.tensorflow.framework.VersionDef.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - producer_ = 0; - - minConsumer_ = 0; - - badConsumers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.tensorflow.framework.VersionsProtos.internal_static_tensorflow_VersionDef_descriptor; - } - - public org.tensorflow.framework.VersionDef getDefaultInstanceForType() { - return org.tensorflow.framework.VersionDef.getDefaultInstance(); - } - - public org.tensorflow.framework.VersionDef build() { - org.tensorflow.framework.VersionDef result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.tensorflow.framework.VersionDef buildPartial() { - org.tensorflow.framework.VersionDef result = new org.tensorflow.framework.VersionDef(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.producer_ = producer_; - result.minConsumer_ = minConsumer_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - badConsumers_ = java.util.Collections.unmodifiableList(badConsumers_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.badConsumers_ = badConsumers_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.tensorflow.framework.VersionDef) { - return mergeFrom((org.tensorflow.framework.VersionDef)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.tensorflow.framework.VersionDef other) { - if (other == org.tensorflow.framework.VersionDef.getDefaultInstance()) return this; - if (other.getProducer() != 0) { - setProducer(other.getProducer()); - } - if (other.getMinConsumer() != 0) { - setMinConsumer(other.getMinConsumer()); - } - if (!other.badConsumers_.isEmpty()) { - if (badConsumers_.isEmpty()) { - badConsumers_ = other.badConsumers_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureBadConsumersIsMutable(); - badConsumers_.addAll(other.badConsumers_); - } - 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.VersionDef parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.tensorflow.framework.VersionDef) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int producer_ ; - /** - * optional int32 producer = 1; - * - *
-     * The version of the code that produced this data.
-     * 
- */ - public int getProducer() { - return producer_; - } - /** - * optional int32 producer = 1; - * - *
-     * The version of the code that produced this data.
-     * 
- */ - public Builder setProducer(int value) { - - producer_ = value; - onChanged(); - return this; - } - /** - * optional int32 producer = 1; - * - *
-     * The version of the code that produced this data.
-     * 
- */ - public Builder clearProducer() { - - producer_ = 0; - onChanged(); - return this; - } - - private int minConsumer_ ; - /** - * optional int32 min_consumer = 2; - * - *
-     * Any consumer below this version is not allowed to consume this data.
-     * 
- */ - public int getMinConsumer() { - return minConsumer_; - } - /** - * optional int32 min_consumer = 2; - * - *
-     * Any consumer below this version is not allowed to consume this data.
-     * 
- */ - public Builder setMinConsumer(int value) { - - minConsumer_ = value; - onChanged(); - return this; - } - /** - * optional int32 min_consumer = 2; - * - *
-     * Any consumer below this version is not allowed to consume this data.
-     * 
- */ - public Builder clearMinConsumer() { - - minConsumer_ = 0; - onChanged(); - return this; - } - - private java.util.List badConsumers_ = java.util.Collections.emptyList(); - private void ensureBadConsumersIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - badConsumers_ = new java.util.ArrayList(badConsumers_); - bitField0_ |= 0x00000004; - } - } - /** - * repeated int32 bad_consumers = 3; - * - *
-     * Specific consumer versions which are disallowed (e.g. due to bugs).
-     * 
- */ - public java.util.List - getBadConsumersList() { - return java.util.Collections.unmodifiableList(badConsumers_); - } - /** - * repeated int32 bad_consumers = 3; - * - *
-     * Specific consumer versions which are disallowed (e.g. due to bugs).
-     * 
- */ - public int getBadConsumersCount() { - return badConsumers_.size(); - } - /** - * repeated int32 bad_consumers = 3; - * - *
-     * Specific consumer versions which are disallowed (e.g. due to bugs).
-     * 
- */ - public int getBadConsumers(int index) { - return badConsumers_.get(index); - } - /** - * repeated int32 bad_consumers = 3; - * - *
-     * Specific consumer versions which are disallowed (e.g. due to bugs).
-     * 
- */ - public Builder setBadConsumers( - int index, int value) { - ensureBadConsumersIsMutable(); - badConsumers_.set(index, value); - onChanged(); - return this; - } - /** - * repeated int32 bad_consumers = 3; - * - *
-     * Specific consumer versions which are disallowed (e.g. due to bugs).
-     * 
- */ - public Builder addBadConsumers(int value) { - ensureBadConsumersIsMutable(); - badConsumers_.add(value); - onChanged(); - return this; - } - /** - * repeated int32 bad_consumers = 3; - * - *
-     * Specific consumer versions which are disallowed (e.g. due to bugs).
-     * 
- */ - public Builder addAllBadConsumers( - java.lang.Iterable values) { - ensureBadConsumersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, badConsumers_); - onChanged(); - return this; - } - /** - * repeated int32 bad_consumers = 3; - * - *
-     * Specific consumer versions which are disallowed (e.g. due to bugs).
-     * 
- */ - public Builder clearBadConsumers() { - badConsumers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - 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.VersionDef) - } - - // @@protoc_insertion_point(class_scope:tensorflow.VersionDef) - private static final org.tensorflow.framework.VersionDef DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.tensorflow.framework.VersionDef(); - } - - public static org.tensorflow.framework.VersionDef getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public VersionDef parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new VersionDef(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public org.tensorflow.framework.VersionDef getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/src/main/java/org/tensorflow/framework/VersionDefOrBuilder.java b/src/main/java/org/tensorflow/framework/VersionDefOrBuilder.java deleted file mode 100644 index d7e8ec1..0000000 --- a/src/main/java/org/tensorflow/framework/VersionDefOrBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/versions.proto - -package org.tensorflow.framework; - -public interface VersionDefOrBuilder extends - // @@protoc_insertion_point(interface_extends:tensorflow.VersionDef) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 producer = 1; - * - *
-   * The version of the code that produced this data.
-   * 
- */ - int getProducer(); - - /** - * optional int32 min_consumer = 2; - * - *
-   * Any consumer below this version is not allowed to consume this data.
-   * 
- */ - int getMinConsumer(); - - /** - * repeated int32 bad_consumers = 3; - * - *
-   * Specific consumer versions which are disallowed (e.g. due to bugs).
-   * 
- */ - java.util.List getBadConsumersList(); - /** - * repeated int32 bad_consumers = 3; - * - *
-   * Specific consumer versions which are disallowed (e.g. due to bugs).
-   * 
- */ - int getBadConsumersCount(); - /** - * repeated int32 bad_consumers = 3; - * - *
-   * Specific consumer versions which are disallowed (e.g. due to bugs).
-   * 
- */ - int getBadConsumers(int index); -} diff --git a/src/main/java/org/tensorflow/framework/VersionsProtos.java b/src/main/java/org/tensorflow/framework/VersionsProtos.java deleted file mode 100644 index 3913972..0000000 --- a/src/main/java/org/tensorflow/framework/VersionsProtos.java +++ /dev/null @@ -1,52 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tensorflow/core/framework/versions.proto - -package org.tensorflow.framework; - -public final class VersionsProtos { - private VersionsProtos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_tensorflow_VersionDef_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_tensorflow_VersionDef_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n(tensorflow/core/framework/versions.pro" + - "to\022\ntensorflow\"K\n\nVersionDef\022\020\n\010producer" + - "\030\001 \001(\005\022\024\n\014min_consumer\030\002 \001(\005\022\025\n\rbad_cons" + - "umers\030\003 \003(\005B,\n\030org.tensorflow.frameworkB" + - "\016VersionsProtosP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_tensorflow_VersionDef_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_tensorflow_VersionDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_tensorflow_VersionDef_descriptor, - new java.lang.String[] { "Producer", "MinConsumer", "BadConsumers", }); - } - - // @@protoc_insertion_point(outer_class_scope) -}