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
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
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.Builderoptional 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.Parseroptional 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
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
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
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
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
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
repeated .tensorflow.DataType type = 6 [packed = true];
- *
- * - * "list(type)" - *- */ - int getTypeValue(int index); - - /** - *
repeated .tensorflow.TensorShapeProto shape = 7;
- *
- * - * "list(shape)" - *- */ - java.util.List
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 extends org.tensorflow.framework.TensorShapeProtoOrBuilder> - 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
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 extends org.tensorflow.framework.TensorProtoOrBuilder> - 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
repeated bytes s = 2;
- *
- * - * "list(string)" - *- */ - public java.util.List
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
repeated int64 i = 3 [packed = true];
- *
- * - * "list(int)" - *- */ - public java.util.List
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
repeated float f = 4 [packed = true];
- *
- * - * "list(float)" - *- */ - public java.util.List
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
repeated bool b = 5 [packed = true];
- *
- * - * "list(bool)" - *- */ - public java.util.List
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
repeated .tensorflow.DataType type = 6 [packed = true];
- *
- * - * "list(type)" - *- */ - public java.util.List
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
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
repeated .tensorflow.TensorShapeProto shape = 7;
- *
- * - * "list(shape)" - *- */ - public java.util.List
repeated .tensorflow.TensorShapeProto shape = 7;
- *
- * - * "list(shape)" - *- */ - public java.util.List extends org.tensorflow.framework.TensorShapeProtoOrBuilder> - 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
repeated .tensorflow.TensorProto tensor = 8;
- *
- * - * "list(tensor)" - *- */ - public java.util.List
repeated .tensorflow.TensorProto tensor = 8;
- *
- * - * "list(tensor)" - *- */ - public java.util.List extends org.tensorflow.framework.TensorProtoOrBuilder> - 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
repeated bytes s = 2;
- *
- * - * "list(string)" - *- */ - public java.util.List
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 extends com.google.protobuf.ByteString> 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
repeated int64 i = 3 [packed = true];
- *
- * - * "list(int)" - *- */ - public java.util.List
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 extends java.lang.Long> 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
repeated float f = 4 [packed = true];
- *
- * - * "list(float)" - *- */ - public java.util.List
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 extends java.lang.Float> 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
repeated bool b = 5 [packed = true];
- *
- * - * "list(bool)" - *- */ - public java.util.List
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 extends java.lang.Boolean> 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
repeated .tensorflow.DataType type = 6 [packed = true];
- *
- * - * "list(type)" - *- */ - public java.util.List
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 extends org.tensorflow.framework.DataType> 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
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
repeated .tensorflow.TensorShapeProto shape = 7;
- *
- * - * "list(shape)" - *- */ - public java.util.List
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 extends org.tensorflow.framework.TensorShapeProto> 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 extends org.tensorflow.framework.TensorShapeProtoOrBuilder> - 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
repeated .tensorflow.TensorProto tensor = 8;
- *
- * - * "list(tensor)" - *- */ - public java.util.List
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 extends org.tensorflow.framework.TensorProto> 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 extends org.tensorflow.framework.TensorProtoOrBuilder> - 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
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
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
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- * 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
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
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
- * 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
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
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
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
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
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
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
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.EnumLiteMapoptional 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
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
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
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.Listrepeated .tensorflow.NodeExecStats node_stats = 2;
- */
- public java.util.Listrepeated .tensorflow.NodeExecStats node_stats = 2;
- */
- public java.util.List extends org.tensorflow.framework.NodeExecStatsOrBuilder>
- 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.Builderoptional 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.Listrepeated .tensorflow.NodeExecStats node_stats = 2;
- */
- public java.util.Listrepeated .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 extends org.tensorflow.framework.NodeExecStats> 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 extends org.tensorflow.framework.NodeExecStatsOrBuilder>
- 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.Listoptional string device = 1;
- */
- java.lang.String getDevice();
- /**
- * optional string device = 1;
- */
- com.google.protobuf.ByteString
- getDeviceBytes();
-
- /**
- * repeated .tensorflow.NodeExecStats node_stats = 2;
- */
- java.util.Listrepeated .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 extends org.tensorflow.framework.NodeExecStatsOrBuilder>
- 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
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
- * 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
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 - .
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
- * 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
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
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
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
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
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
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
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
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
repeated .tensorflow.FunctionDef.Node node = 2;
- *
- * - * The body of the function. - *- */ - public java.util.List
repeated .tensorflow.FunctionDef.Node node = 2;
- *
- * - * The body of the function. - *- */ - public java.util.List extends org.tensorflow.framework.FunctionDef.NodeOrBuilder> - 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
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
repeated .tensorflow.FunctionDef.Node node = 2;
- *
- * - * The body of the function. - *- */ - public java.util.List
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 extends org.tensorflow.framework.FunctionDef.Node> 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 extends org.tensorflow.framework.FunctionDef.NodeOrBuilder> - 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
- * 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
repeated .tensorflow.FunctionDef function = 1;
- */
- public java.util.Listrepeated .tensorflow.FunctionDef function = 1;
- */
- public java.util.List extends org.tensorflow.framework.FunctionDefOrBuilder>
- 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
repeated .tensorflow.FunctionDef function = 1;
- */
- public java.util.Listrepeated .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 extends org.tensorflow.framework.FunctionDef> 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 extends org.tensorflow.framework.FunctionDefOrBuilder>
- 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.Listrepeated .tensorflow.FunctionDef function = 1;
- */
- java.util.Listrepeated .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 extends org.tensorflow.framework.FunctionDefOrBuilder>
- 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
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 extends org.tensorflow.framework.FunctionDef.NodeOrBuilder> - 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
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
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
repeated .tensorflow.NodeDef node = 1;
- */
- public java.util.Listrepeated .tensorflow.NodeDef node = 1;
- */
- public java.util.List extends org.tensorflow.framework.NodeDefOrBuilder>
- 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
repeated .tensorflow.NodeDef node = 1;
- */
- public java.util.Listrepeated .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 extends org.tensorflow.framework.NodeDef> 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 extends org.tensorflow.framework.NodeDefOrBuilder>
- 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.Listoptional .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.Parserrepeated .tensorflow.NodeDef node = 1;
- */
- java.util.Listrepeated .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 extends org.tensorflow.framework.NodeDefOrBuilder>
- 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
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
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
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.Listrepeated 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
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
repeated double bucket = 7 [packed = true];
- */
- public java.util.Listrepeated 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
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.Listrepeated 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
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 extends java.lang.Double> 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
repeated double bucket = 7 [packed = true];
- */
- public java.util.Listrepeated 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 extends java.lang.Double> 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.Parseroptional 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
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.Listrepeated 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.ArrayListoptional 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
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
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
repeated .tensorflow.KernelDef.AttrConstraint constraint = 3;
- */
- public java.util.Listrepeated .tensorflow.KernelDef.AttrConstraint constraint = 3;
- */
- public java.util.List extends org.tensorflow.framework.KernelDef.AttrConstraintOrBuilder>
- 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
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
repeated .tensorflow.KernelDef.AttrConstraint constraint = 3;
- */
- public java.util.Listrepeated .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 extends org.tensorflow.framework.KernelDef.AttrConstraint> 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 extends org.tensorflow.framework.KernelDef.AttrConstraintOrBuilder>
- 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.Listrepeated 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
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
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.Listrepeated .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 extends org.tensorflow.framework.KernelDef.AttrConstraintOrBuilder>
- 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
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
- .map<string, .tensorflow.AttrValue> attr = 2;
- */
-
- public java.util.Map- * 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
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.MapFieldmap<string, .tensorflow.AttrValue> attr = 2;
- */
- public java.util.Mapmap<string, .tensorflow.AttrValue> attr = 2;
- */
- public java.util.Mapmap<string, .tensorflow.AttrValue> attr = 2;
- */
- public Builder putAllAttr(
- java.util.Mapoptional string name = 1;
- */
- java.lang.String getName();
- /**
- * optional string name = 1;
- */
- com.google.protobuf.ByteString
- getNameBytes();
-
- /**
- * map<string, .tensorflow.AttrValue> attr = 2;
- */
- java.util.Mapoptional 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
- .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